fehlerbehebung

This commit is contained in:
xoy 2023-01-28 23:18:28 +01:00
parent e8e00b7042
commit c8dbfd542e
1 changed files with 3 additions and 0 deletions

View File

@ -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"