Update data.go (#1)
This commit is contained in:
parent
e167c3e1ef
commit
64721abaa3
@ -66,11 +66,8 @@ func handle(fn handleFunc, prefix string, store *storage.Storage, server *settin
|
|||||||
server: server,
|
server: server,
|
||||||
})
|
})
|
||||||
|
|
||||||
if status >= 400 || err != nil {
|
|
||||||
clientIP := realip.FromRequest(r)
|
clientIP := realip.FromRequest(r)
|
||||||
log.Printf("%s: %v %s %v", r.URL.Path, status, clientIP, err)
|
log.Printf("%s: %v %s %v", r.URL.Path, status, clientIP, err)
|
||||||
}
|
|
||||||
|
|
||||||
if status != 0 {
|
if status != 0 {
|
||||||
txt := http.StatusText(status)
|
txt := http.StatusText(status)
|
||||||
http.Error(w, strconv.Itoa(status)+" "+txt, status)
|
http.Error(w, strconv.Itoa(status)+" "+txt, status)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user