Skip to content
Browse files

update for gc weekly.2011-06-23

  • Loading branch information...
1 parent 32ed881 commit 79dc98d08d984e20144de615a0858aedbf4c24f4 @fiber fiber committed
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")

0 comments on commit 79dc98d

Please sign in to comment.
Something went wrong with that request. Please try again.