Update for gofix httpheaders

This commit is contained in:
Brad Fitzpatrick 2011-06-16 18:38:21 -07:00
parent a170c567a3
commit 8f38212408
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ func newReq(url string) *http.Request {
if err != nil { if err != nil {
panic(fmt.Sprintf("s3 client; invalid URL: %v", err)) panic(fmt.Sprintf("s3 client; invalid URL: %v", err))
} }
req.UserAgent = "go-camlistore-s3" req.Header.Set("User-Agent", "go-camlistore-s3")
return req return req
} }

View File

@ -51,8 +51,8 @@ func (h *logHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
ip: addr, ip: addr,
method: r.Method, method: r.Method,
rawpath: r.URL.RawPath, rawpath: r.URL.RawPath,
userAgent: r.UserAgent, userAgent: r.UserAgent(),
referer: r.Referer, referer: r.Referer(),
responseStatus: http.StatusOK, responseStatus: http.StatusOK,
proto: r.Proto, proto: r.Proto,
ResponseWriter: rw, ResponseWriter: rw,