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

Issue 6210067: code review 6210067: net/http: distinguish between query string and body par... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by pmylund
Modified:
11 years, 10 months ago
Reviewers:
CC:
rsc, bradfitz, dsymonds, golang-dev, rodrigo.moraes
Visibility:
Public.

Description

net/http: distinguish between query string and body parameters, add a body-only (POST/PUT) parameter accessor, and prioritize POST/PUT body over the URL query string in FormValue. Fixes issue 3630.

Patch Set 1 #

Patch Set 2 : diff -r 85e153815747 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 85e153815747 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 85e153815747 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 85e153815747 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 85e153815747 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 7 : diff -r 85e153815747 https://go.googlecode.com/hg/ #

Patch Set 8 : diff -r 85e153815747 https://go.googlecode.com/hg/ #

Patch Set 9 : diff -r 3c702dae5f50 https://go.googlecode.com/hg/ #

Patch Set 10 : diff -r 1195a9780464 https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 11 : diff -r c88692a626e9 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -50 lines) Patch
M src/pkg/net/http/request.go View 1 2 3 4 5 6 7 8 9 10 4 chunks +93 lines, -46 lines 0 comments Download
M src/pkg/net/http/request_test.go View 1 2 3 4 5 6 7 8 9 3 chunks +36 lines, -4 lines 0 comments Download

Messages

Total messages: 30
pmylund
Hello golang-dev@googlegroups.com (cc: bradfitz@golang.org, rsc@golang.org), I'd like you to review this change to https://go.googlecode.com/hg/
12 years ago (2012-05-18 07:06:13 UTC) #1
pmylund
I'm a little split here: - req.FormValue("foo") still "just works" (prioritizing body values) - Adds ...
12 years ago (2012-05-18 07:08:51 UTC) #2
dsymonds
On Fri, May 18, 2012 at 5:08 PM, <patrick@patrickmn.com> wrote: > - BREAKS req.Form["foo"] where ...
12 years ago (2012-05-18 07:29:48 UTC) #3
pmylund
I suspected. I'll change and resubmit. Thanks. On Fri, May 18, 2012 at 9:29 AM, ...
12 years ago (2012-05-18 07:31:09 UTC) #4
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org (cc: bradfitz@golang.org, golang-dev@googlegroups.com, rsc@golang.org), Please take another look.
12 years ago (2012-05-18 08:34:20 UTC) #5
pmylund
This still changes the ordering of POST vs. GET values (see issue 3630.) This arguably ...
12 years ago (2012-05-18 08:39:21 UTC) #6
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org (cc: bradfitz@golang.org, golang-dev@googlegroups.com, rsc@golang.org), Please take another look.
12 years ago (2012-05-18 08:55:29 UTC) #7
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org (cc: bradfitz@golang.org, golang-dev@googlegroups.com, rsc@golang.org), Please take another look.
12 years ago (2012-05-18 09:14:27 UTC) #8
rodrigo.moraes
http://codereview.appspot.com/6210067/diff/11001/src/pkg/net/http/request.go File src/pkg/net/http/request.go (right): http://codereview.appspot.com/6210067/diff/11001/src/pkg/net/http/request.go#newcode628 src/pkg/net/http/request.go:628: } After this, add a "if r.BodyForm == nil ...
12 years ago (2012-05-18 13:55:54 UTC) #9
rodrigo.moraes
Quick take: http://codereview.appspot.com/6208080
12 years ago (2012-05-18 14:26:00 UTC) #10
rsc
Please call BodyForm PostForm. Thanks. Russ
12 years ago (2012-05-18 15:40:15 UTC) #11
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org, rodrigo.moraes@gmail.com (cc: bradfitz@golang.org, golang-dev@googlegroups.com, rsc@golang.org), Please take another look.
12 years ago (2012-05-18 17:18:25 UTC) #12
pmylund
On 2012/05/18 17:18:25, pmylund wrote: > Hello mailto:golang-dev@googlegroups.com, mailto:dsymonds@golang.org, mailto:rodrigo.moraes@gmail.com > (cc: mailto:bradfitz@golang.org, mailto:golang-dev@googlegroups.com, mailto:rsc@golang.org), ...
12 years ago (2012-05-18 17:21:06 UTC) #13
rodrigo.moraes
On 2012/05/18 17:21:06, pmylund wrote: > FormValue will still return a query parameter value if ...
12 years ago (2012-05-18 20:20:14 UTC) #14
pmylund
On 2012/05/18 20:20:14, rodrigo.moraes wrote: > On 2012/05/18 17:21:06, pmylund wrote: > > FormValue will ...
12 years ago (2012-05-18 20:25:03 UTC) #15
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org, rodrigo.moraes@gmail.com (cc: bradfitz@golang.org, golang-dev@googlegroups.com, rsc@golang.org), Please take another look.
12 years ago (2012-05-18 21:03:04 UTC) #16
rodrigo.moraes
On 2012/05/18 20:25:03, pmylund wrote: > Indeed, but it presents the same security issue as ...
12 years ago (2012-05-18 21:06:48 UTC) #17
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org, rodrigo.moraes@gmail.com (cc: bradfitz@golang.org, golang-dev@googlegroups.com, rsc@golang.org), Please take another look.
12 years ago (2012-05-20 02:17:59 UTC) #18
pmylund
Sorry for the many submissions. Should've spotted everything now.
12 years ago (2012-05-20 02:18:56 UTC) #19
pmylund
Hey rsc, Would you like me to revise this? Move less code around? Make the ...
11 years, 11 months ago (2012-05-29 16:12:57 UTC) #20
rsc
It would be nice to have smaller diffs, yes. parsePostForm should at least be moved ...
11 years, 11 months ago (2012-05-29 16:19:37 UTC) #21
pmylund
On 2012/05/29 16:19:37, rsc wrote: > It would be nice to have smaller diffs, yes. ...
11 years, 11 months ago (2012-05-29 16:30:22 UTC) #22
rsc
On Tue, May 29, 2012 at 12:30 PM, <patrick@patrickmn.com> wrote: > The behavior does change ...
11 years, 11 months ago (2012-05-29 16:32:21 UTC) #23
pmylund
On 2012/05/29 16:32:21, rsc wrote: > On Tue, May 29, 2012 at 12:30 PM, <mailto:patrick@patrickmn.com> ...
11 years, 11 months ago (2012-05-29 16:50:45 UTC) #24
pmylund
Hello golang-dev@googlegroups.com, dsymonds@golang.org, rodrigo.moraes@gmail.com (cc: bradfitz@golang.org, golang-dev@googlegroups.com, rsc@golang.org), Please take another look.
11 years, 11 months ago (2012-05-30 13:57:00 UTC) #25
rsc
I'm sorry for dropping this. I think it's in good shape, just a few small ...
11 years, 11 months ago (2012-06-26 00:14:55 UTC) #26
pmylund
On 2012/06/26 00:14:55, rsc wrote: > I'm sorry for dropping this. I think it's in ...
11 years, 11 months ago (2012-06-26 00:22:43 UTC) #27
pmylund
Hello rsc@golang.org (cc: bradfitz@golang.org, dsymonds@golang.org, golang-dev@googlegroups.com, rodrigo.moraes@gmail.com), Please take another look.
11 years, 11 months ago (2012-06-26 00:34:03 UTC) #28
rsc
LGTM
11 years, 11 months ago (2012-06-26 00:41:07 UTC) #29
rsc
11 years, 11 months ago (2012-06-26 00:41:57 UTC) #30
*** Submitted as http://code.google.com/p/go/source/detail?r=0dac18e695f3 ***

net/http: provide access to POST-only form values

Fixes issue 3630.

R=rsc
CC=bradfitz, dsymonds, golang-dev, rodrigo.moraes
http://codereview.appspot.com/6210067

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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