Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9567)

Issue 44040043: code review 44040043: net/http: Return ErrNotMultipart from ParseMultipartFor...

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by mattcottingham
Modified:
10 years ago
Reviewers:
bradfitz
CC:
golang-codereviews, gobot, bradfitz, rsc
Visibility:
Public.

Description

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 issue 6334. This is the first changeset working on multipart request handling. Further changesets could add more tests and clean up the TODO.

Patch Set 1 #

Patch Set 2 : diff -r 477af6a8e51f https://code.google.com/p/go #

Patch Set 3 : diff -r 25cd0f8e0134 https://code.google.com/p/go #

Total comments: 1

Patch Set 4 : diff -r 1849f83423ca http://code.google.com/p/go #

Patch Set 5 : diff -r 1849f83423ca http://code.google.com/p/go #

Patch Set 6 : diff -r 1849f83423ca http://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -11 lines) Patch
M src/pkg/net/http/request.go View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M src/pkg/net/http/request_test.go View 1 2 3 4 2 chunks +48 lines, -8 lines 0 comments Download

Messages

Total messages: 17
mattcottingham
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years, 4 months ago (2013-12-18 20:30:35 UTC) #1
gobot
R=bradfitz@golang.org (assigned by rsc@google.com)
10 years, 4 months ago (2013-12-19 17:08:16 UTC) #2
gobot
Replacing golang-dev with golang-codereviews.
10 years, 4 months ago (2013-12-20 16:26:17 UTC) #3
bradfitz
https://codereview.appspot.com/44040043/diff/40001/src/pkg/net/http/request.go File src/pkg/net/http/request.go (right): https://codereview.appspot.com/44040043/diff/40001/src/pkg/net/http/request.go#newcode784 src/pkg/net/http/request.go:784: return err This looks very intentional. If this were ...
10 years, 4 months ago (2013-12-26 20:51:11 UTC) #4
mattcottingham
On 2013/12/26 20:51:11, bradfitz wrote: > https://codereview.appspot.com/44040043/diff/40001/src/pkg/net/http/request.go > File src/pkg/net/http/request.go (right): > > https://codereview.appspot.com/44040043/diff/40001/src/pkg/net/http/request.go#newcode784 > ...
10 years, 4 months ago (2013-12-27 14:45:10 UTC) #5
bradfitz
I do want to see this code simplified, so go for it. It will have ...
10 years, 4 months ago (2013-12-27 16:47:03 UTC) #6
mattcottingham_gmail.com
On 27 December 2013 16:47, Brad Fitzpatrick <bradfitz@golang.org> wrote: > I do want to see ...
10 years, 4 months ago (2013-12-27 17:44:58 UTC) #7
bradfitz
On Fri, Dec 27, 2013 at 9:44 AM, Matt Cottingham <mattcottingham@gmail.com>wrote: > On 27 December ...
10 years, 4 months ago (2013-12-27 17:48:31 UTC) #8
mattcottingham_gmail.com
On 27 December 2013 17:48, Brad Fitzpatrick <bradfitz@golang.org> wrote: > On Fri, Dec 27, 2013 ...
10 years, 4 months ago (2013-12-27 18:13:28 UTC) #9
bradfitz
Did you determine whether this breaks any publicly-visible behavior or side effects?
10 years, 3 months ago (2014-01-14 23:30:16 UTC) #10
mattcottingham
On 2014/01/14 23:30:16, bradfitz wrote: > Did you determine whether this breaks any publicly-visible behavior ...
10 years, 3 months ago (2014-01-16 22:38:38 UTC) #11
rsc
matt, if you'd like this to be in go 1.3 we need to wrap up ...
10 years, 1 month ago (2014-03-05 20:00:20 UTC) #12
mattcottingham
Hello golang-codereviews@googlegroups.com, gobot@golang.org, bradfitz@golang.org, rsc@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 1 month ago (2014-03-09 20:06:21 UTC) #13
mattcottingham
On 2014/03/09 20:06:21, mattcottingham wrote: > Hello mailto:golang-codereviews@googlegroups.com, mailto:gobot@golang.org, > mailto:bradfitz@golang.org, mailto:rsc@golang.org (cc: mailto:golang-codereviews@googlegroups.com), > ...
10 years, 1 month ago (2014-03-09 20:07:29 UTC) #14
rsc
thanks. brad?
10 years, 1 month ago (2014-03-13 02:32:25 UTC) #15
bradfitz
LGTM Sorry for the delay. This turned out less scary than it sounded. Thanks for ...
10 years ago (2014-04-11 05:50:00 UTC) #16
bradfitz
10 years ago (2014-04-11 05:50:12 UTC) #17
*** Submitted as https://code.google.com/p/go/source/detail?r=f5ef7ec5b144 ***

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 issue 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://codereview.appspot.com/44040043

Committer: Brad Fitzpatrick <bradfitz@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b