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 {
panic(fmt.Sprintf("s3 client; invalid URL: %v", err))
}
req.UserAgent = "go-camlistore-s3"
req.Header.Set("User-Agent", "go-camlistore-s3")
return req
}

View File

@ -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,