Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed to work with weekly.2011-06-23 8864

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...
commit 4e0379d1741628ac1b8cb93e7b4c411d2a7b2ee3 1 parent 56fb5f6
@athiwatc authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 request.go
View
8 request.go
@@ -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,
}
@@ -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")
Please sign in to comment.
Something went wrong with that request. Please try again.