From c8dbfd542e445095663b4d63f9745011a1a4535f Mon Sep 17 00:00:00 2001 From: xoy Date: Sat, 28 Jan 2023 23:18:28 +0100 Subject: [PATCH] fehlerbehebung --- http.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/http.go b/http.go index 125894a..617d026 100644 --- a/http.go +++ b/http.go @@ -3,9 +3,11 @@ package main import ( "io" "net/http" + "strings" ) func httpHandleFunc(urlPath string, filepath string, contentType string) { + urlPath = strings.ToLower(urlPath) logger(readHttpYML() + "/" + urlPath + " <--> " + filepath + " <" + contentType + ">") http.HandleFunc("/"+urlPath, func(w http.ResponseWriter, r *http.Request) { logger(r.Method + " request -> " + readHttpYML() + "/" + urlPath + " <" + contentType + ">") @@ -17,6 +19,7 @@ func httpHandleFunc(urlPath string, filepath string, contentType string) { } func httpHandleFuncWithPOST(urlPath string, filepath string, contentType string) { + urlPath = strings.ToLower(urlPath) logger(readHttpYML() + "/" + urlPath + " <--> " + filepath + " <" + contentType + ">") s := new(submit) s.data = "null"