Skip to content

net/http: document that ParseMultipartForm requires Content-Type: multipart/form-data as of Go 1.3 #8403

Closed
@gopherbot

Description

@gopherbot

by dgrijalva@fitstar.com:

Prior to go1.3, calling ParseMultipartForm on a http.Request that did not have the
content type 'multipart/form-data' would silently just do the right thing.  As of 1.3,
an error is returned that looks like 'request Content-Type isn't multipart/form-data'. 
I couldn't find this behavior change anywhere in the release notes.

This different behavior seems logical, although less convenient for my use case.  What
strikes me as unusual is that it's not totally backwards compatible and there doesn't
seem to be mention of in the release notes.  Was this an intentional change or an
oversight?  Will it be changed back or should I work around it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions