1
0
mirror of https://github.com/golang/go synced 2024-11-12 08:50:22 -07:00

http: remove a TODO due to new behavior of nil maps

R=golang-dev, dsymonds, adg
CC=golang-dev
https://golang.org/cl/4907049
This commit is contained in:
Rob Pike 2011-08-18 11:01:43 +10:00
parent e4a89d7cca
commit 8380ff34ed

View File

@ -619,8 +619,6 @@ func (r *Request) ParseForm() (err os.Error) {
if r.URL != nil {
r.Form, err = url.ParseQuery(r.URL.RawQuery)
} else {
r.Form = make(url.Values) // TODO: remove when nil maps work.
}
if r.Method == "POST" {
if r.Body == nil {
@ -645,6 +643,9 @@ func (r *Request) ParseForm() (err os.Error) {
if err == nil {
err = e
}
if r.Form == nil {
r.Form = make(url.Values)
}
// Copy values into r.Form. TODO: make this smoother.
for k, vs := range newValues {
for _, value := range vs {