net/http: Return ErrNotMultipart from ParseMultipartForm if content-type isn't multipart/form-data.
Add test for multipart form requests with an invalid content-type to ensure ErrNotMultipart is returned. Change ParseMultipartForm to return ErrNotMultipart when it is returned by multipartReader. Modify test for empty multipart request handling to use POST so that the body is checked. Fixes #6334. This is the first changeset working on multipart request handling. Further changesets could add more tests and clean up the TODO. LGTM=bradfitz R=golang-codereviews, gobot, bradfitz, rsc CC=golang-codereviews https://golang.org/cl/44040043
Showing
Please
register
or
sign in
to comment