diff --git a/lib/go/camli/misc/amazon/s3/client.go b/lib/go/camli/misc/amazon/s3/client.go index 188b5b0a0..8a2ccb9b3 100644 --- a/lib/go/camli/misc/amazon/s3/client.go +++ b/lib/go/camli/misc/amazon/s3/client.go @@ -54,7 +54,7 @@ func newReq(url string) *http.Request { if err != nil { panic(fmt.Sprintf("s3 client; invalid URL: %v", err)) } - req.UserAgent = "go-camlistore-s3" + req.Header.Set("User-Agent", "go-camlistore-s3") return req } diff --git a/website/logging.go b/website/logging.go index d89ce955c..7ee4dbd2f 100644 --- a/website/logging.go +++ b/website/logging.go @@ -51,8 +51,8 @@ func (h *logHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { ip: addr, method: r.Method, rawpath: r.URL.RawPath, - userAgent: r.UserAgent, - referer: r.Referer, + userAgent: r.UserAgent(), + referer: r.Referer(), responseStatus: http.StatusOK, proto: r.Proto, ResponseWriter: rw,