This commit is contained in:
2023-09-14 11:16:56 +08:00
parent 5c2aa9d6fa
commit 3a443659ad

View File

@@ -682,7 +682,15 @@ func ResponseNotFound404UriNotExist(w http.ResponseWriter, r *http.Request) {
ResponseStatusOK204NoContent(w)
return
}
log.Errorf("r.Method:%s, r.URL:%s", r.Method, r.URL)
log.Trace(" From Host:", r.RemoteAddr)
log.Trace(" To Host:", r.Host)
log.Debug(" RequestUri:", r.RequestURI)
log.Trace(" Method:", r.Method)
log.Trace(" Proto:", r.Proto)
log.Trace(" ContentLength:", r.ContentLength)
log.Trace(" User-Agent:", r.Header.Get("User-Agent"))
log.Trace(" Content-Type:", r.Header.Get("Content-Type"))
log.Trace(" AccessToken:", r.Header.Get("AccessToken"))
errorMessage := ErrorMessage{"1", "the requested URI does not exist"}
errorResponse := ErrorResponse{errorMessage}
ResponseWithJson(w, http.StatusNotFound, errorResponse)