Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: ParseMultipartForm should populate PostForm with field values #9305

Closed
ghost opened this issue Dec 13, 2014 · 3 comments
Closed

net/http: ParseMultipartForm should populate PostForm with field values #9305

ghost opened this issue Dec 13, 2014 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 13, 2014

Currently ParseMultipartForm() appends values to the request's Form only: http://play.golang.org/p/OHN6v9z7-P

Whereas, the docs for PostFormValue() say, that it calls ParseMultipartForm():

PostFormValue returns the first value for the named component of the POST or PUT request body.
URL query parameters are ignored. PostFormValue calls ParseMultipartForm and ParseForm if
necessary and ignores any errors returned by these functions.

But PostForm remains empty, and PostFormValue() returns an empty string. I think that's illogical. I'd expect it to add form fields values to the request's PostForm. It is a POST request, after all.

@bradfitz bradfitz self-assigned this Dec 13, 2014
@bradfitz
Copy link
Contributor

I suppose we could put it in both places.

@rsc rsc added this to the Go1.5Maybe milestone Apr 10, 2015
@rsc
Copy link
Contributor

rsc commented Jun 29, 2015

Too late for Go 1.5.

@rsc rsc modified the milestones: Unplanned, Go1.5Maybe Jun 29, 2015
@gopherbot
Copy link

CL https://golang.org/cl/19986 mentions this issue.

massar added a commit to tridentli/pitchfork that referenced this issue Dec 7, 2016
@golang golang locked and limited conversation to collaborators Mar 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants