fehlerbehebung
This commit is contained in:
parent
7e446de2cb
commit
b539e6fc0d
3
http.go
3
http.go
|
@ -3,9 +3,11 @@ package main
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func httpHandleFunc(urlPath string, filepath string, contentType string) {
|
func httpHandleFunc(urlPath string, filepath string, contentType string) {
|
||||||
|
urlPath = strings.ToLower(urlPath)
|
||||||
logger(readHttpYML() + "/" + urlPath + " <--> " + filepath + " <" + contentType + ">")
|
logger(readHttpYML() + "/" + urlPath + " <--> " + filepath + " <" + contentType + ">")
|
||||||
http.HandleFunc("/"+urlPath, func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/"+urlPath, func(w http.ResponseWriter, r *http.Request) {
|
||||||
logger(r.Method + " request -> " + readHttpYML() + "/" + urlPath + " <" + contentType + ">")
|
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) {
|
func httpHandleFuncWithPOST(urlPath string, filepath string, contentType string) {
|
||||||
|
urlPath = strings.ToLower(urlPath)
|
||||||
logger(readHttpYML() + "/" + urlPath + " <--> " + filepath + " <" + contentType + ">")
|
logger(readHttpYML() + "/" + urlPath + " <--> " + filepath + " <" + contentType + ">")
|
||||||
s := new(submit)
|
s := new(submit)
|
||||||
s.data = "null"
|
s.data = "null"
|
||||||
|
|
Loading…
Reference in New Issue