Commit 42cf59a7 authored by Robert Griesemer's avatar Robert Griesemer

show remote addr instead of host in log lines

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29961
CL=29961
parent 8604e180
...@@ -599,7 +599,7 @@ func servePkg(c *http.Conn, r *http.Request) { ...@@ -599,7 +599,7 @@ func servePkg(c *http.Conn, r *http.Request) {
func loggingHandler(h http.Handler) http.Handler { func loggingHandler(h http.Handler) http.Handler {
return http.HandlerFunc(func(c *http.Conn, req *http.Request) { return http.HandlerFunc(func(c *http.Conn, req *http.Request) {
log.Stderrf("%s\t%s", req.Host, req.Url.Path); log.Stderrf("%s\t%s", c.RemoteAddr, req.Url);
h.ServeHTTP(c, req); h.ServeHTTP(c, req);
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment