X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=handler.go;h=4593a2f119262608082414f00e9da6713dd75260;hb=d25bee6e2b2d1830ad225ba043a4480178753f9c;hp=df16c38d5e11bf05092f7c6b1bcaf606be8a87c7;hpb=b7f73b8bf0755851da095d6dcfa1c4eac17b0c50;p=godlighty.git diff --git a/handler.go b/handler.go index df16c38..4593a2f 100644 --- a/handler.go +++ b/handler.go @@ -69,7 +69,7 @@ func (h Handler) Handle( host string, cfg *HostCfg, ) { notFound := func() { - fmt.Printf("%s %s \"%s %s %s\" %d \"%s\"\n", + fmt.Printf("%s %s \"%s %+q %s\" %d \"%s\"\n", r.RemoteAddr, host, r.Method, r.URL.Path, r.Proto, http.StatusNotFound, r.Header.Get("User-Agent"), @@ -90,7 +90,7 @@ func (h Handler) Handle( username = "user:" + username + " " } printErr := func(code int, err error) { - fmt.Printf("%s %s \"%s %s %s\" %d \"%s\" %s\"%s\"\n", + fmt.Printf("%s %s \"%s %+q %s\" %d \"%s\" %s\"%s\"\n", r.RemoteAddr, host, r.Method, r.URL.Path, r.Proto, code, err.Error(), username, r.Header.Get("User-Agent"), @@ -139,7 +139,7 @@ func (h Handler) Handle( } wc := &CountResponseWriter{ResponseWriter: w} dav.ServeHTTP(wc, r) - fmt.Printf("%s %s \"WebDAV %s\" %d %d %s\"%s\"\n", + fmt.Printf("%s %s \"WebDAV %+q\" %d %d %s\"%s\"\n", r.RemoteAddr, host, r.URL.Path, wc.Status, wc.Size, username, r.Header.Get("User-Agent"), @@ -148,7 +148,7 @@ func (h Handler) Handle( } if !(r.Method == "" || r.Method == http.MethodGet) { - fmt.Printf("%s %s \"%s %s %s\" %d %s\"%s\"\n", + fmt.Printf("%s %s \"%s %+q %s\" %d %s\"%s\"\n", r.RemoteAddr, host, r.Method, r.URL.Path, r.Proto, http.StatusMethodNotAllowed, username, r.Header.Get("User-Agent"), @@ -285,7 +285,7 @@ IndexLookup: wr := wc.(*gzipResponseWriter) w.WriteHeader(wr.status) w.Write(bufCompressed.Bytes()) - fmt.Printf("%s %s \"%s %s %s\" %d %d %s\"%s\"\n", + fmt.Printf("%s %s \"%s %+q %s\" %d %d %s\"%s\"\n", r.RemoteAddr, host, r.Method, r.URL.Path, r.Proto, wr.status, size, username, r.Header.Get("User-Agent"), @@ -293,7 +293,7 @@ IndexLookup: return } wr := wc.(*CountResponseWriter) - fmt.Printf("%s %s \"%s %s %s\" %d %d %s\"%s\"\n", + fmt.Printf("%s %s \"%s %+q %s\" %d %d %s\"%s\"\n", r.RemoteAddr, host, r.Method, r.URL.Path, r.Proto, wr.Status, wr.Size, username, r.Header.Get("User-Agent"),