mirror of
https://github.com/golang/go
synced 2024-11-25 07:57:56 -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:
parent
e4a89d7cca
commit
8380ff34ed
@ -619,8 +619,6 @@ func (r *Request) ParseForm() (err os.Error) {
|
|||||||
|
|
||||||
if r.URL != nil {
|
if r.URL != nil {
|
||||||
r.Form, err = url.ParseQuery(r.URL.RawQuery)
|
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.Method == "POST" {
|
||||||
if r.Body == nil {
|
if r.Body == nil {
|
||||||
@ -645,6 +643,9 @@ func (r *Request) ParseForm() (err os.Error) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
err = e
|
err = e
|
||||||
}
|
}
|
||||||
|
if r.Form == nil {
|
||||||
|
r.Form = make(url.Values)
|
||||||
|
}
|
||||||
// Copy values into r.Form. TODO: make this smoother.
|
// Copy values into r.Form. TODO: make this smoother.
|
||||||
for k, vs := range newValues {
|
for k, vs := range newValues {
|
||||||
for _, value := range vs {
|
for _, value := range vs {
|
||||||
|
Loading…
Reference in New Issue
Block a user