Skip to content

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

Closed
@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions