Skip to content

Commit

Permalink
Fixed to work with weekly.2011-06-23 8864
Browse files Browse the repository at this point in the history
There's some left over "ErrorString" uses. -> changed to "NewError"
Changed hr.Referer -> hr.Referer()
Changed hr.UserAgent -> hr.UserAgent()
Changed hr.Cookie -> hr.Cookies()
  • Loading branch information
athiwatc committed Jul 4, 2011
1 parent 56fb5f6 commit 4e0379d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ func newRequest(hr *http.Request, hc http.ResponseWriter) *Request {
Body: hr.Body,
Close: hr.Close,
Host: hr.Host,
Referer: hr.Referer,
UserAgent: hr.UserAgent,
Referer: hr.Referer(),
UserAgent: hr.UserAgent(),
FullParams: hr.Form,
Cookie: hr.Cookie,
Cookie: hr.Cookies(),
RemoteAddr: remoteAddr.IP.String(),
RemotePort: remoteAddr.Port,
}
Expand Down Expand Up @@ -181,7 +181,7 @@ func (r *Request) parseParams() (err os.Error) {
switch r.Method {
case "POST":
if r.Body == nil {
return os.ErrorString("missing form body")
return os.NewError("missing form body")
}

ct := r.Headers.Get("Content-Type")
Expand Down

0 comments on commit 4e0379d

Please sign in to comment.