Skip to content
Permalink
Browse files

include entire URL, not just path in warning

It is sometimes useful to also see the query parameters.
No point in leaving them out, so include the entire URL.
  • Loading branch information
dmitshur committed Nov 28, 2019
1 parent 8744288 commit aba3cf9e079c2885a0b12eba1eb5343c2dc5e61b
Showing with 1 addition and 1 deletion.
  1. +1 −1 main.go
@@ -350,7 +350,7 @@ func (t top) ServeHTTP(w http.ResponseWriter, req *http.Request) {
log.Printf("warning: req.URL.Path was modified from %v to %v\n", path, req.URL.Path)
}
if rw.WroteBytes && !haveType(w) {
log.Printf("warning: Content-Type header not set for %v %q\n", req.Method, path)
log.Printf("warning: Content-Type header not set for %v %q\n", req.Method, req.URL)
}
}

0 comments on commit aba3cf9

Please sign in to comment.
You can’t perform that action at this time.