From 8f38212408628ec1cb92c867a0ecd37d0e26f739 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 16 Jun 2011 18:38:21 -0700 Subject: [PATCH] Update for gofix httpheaders --- lib/go/camli/misc/amazon/s3/client.go | 2 +- website/logging.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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,