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

Issue 217066: Modified Request.Write to use RawURL, if given, otherwi... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by petar-m
Modified:
14 years, 2 months ago
Reviewers:
hoisie
CC:
rsc, golang-dev
Visibility:
Public.

Description

Modified Request.Write to use RawURL, if given, otherwise use URL as before.

Patch Set 1 #

Patch Set 2 : code review 217066: Modified Request.Write to use RawURL, if given, otherwi... #

Total comments: 2

Patch Set 3 : code review 217066: Modified Request.Write to use RawURL, if given, otherwi... #

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

Messages

Total messages: 8
rsc
looks good, one nit http://codereview.appspot.com/217066/diff/3/1002 File src/pkg/http/request.go (right): http://codereview.appspot.com/217066/diff/3/1002#newcode155 src/pkg/http/request.go:155: // URL // RawURL, if ...
14 years, 2 months ago (2010-02-22 22:55:19 UTC) #1
petar-m
Done http://codereview.appspot.com/217066/diff/3/1002 File src/pkg/http/request.go (right): http://codereview.appspot.com/217066/diff/3/1002#newcode155 src/pkg/http/request.go:155: // URL On 2010/02/22 22:55:19, rsc wrote: > ...
14 years, 2 months ago (2010-02-22 23:03:30 UTC) #2
rsc
LGTM i changed the spaces in the changed comment to a tab. you might want ...
14 years, 2 months ago (2010-02-22 23:39:27 UTC) #3
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=fc4c32b30734 *** http: use RawURL in Request.Write R=rsc CC=golang-dev http://codereview.appspot.com/217066 Committer: Russ ...
14 years, 2 months ago (2010-02-22 23:39:32 UTC) #4
hoisie
This doesn't seem right. uri should be the stuff after the slash, but it could ...
14 years, 2 months ago (2010-02-23 18:10:11 UTC) #5
petar_csail.mit.edu
I am not sure what you mean. What we've done is simple: If you want ...
14 years, 2 months ago (2010-02-23 18:13:04 UTC) #6
hoisie
I guess I'm confused about the meaning of RawURL: var req http.Request req.Host = "google.com" ...
14 years, 2 months ago (2010-02-23 18:26:02 UTC) #7
rsc
14 years, 2 months ago (2010-02-23 18:29:51 UTC) #8
On Tue, Feb 23, 2010 at 10:26,  <hoisie@gmail.com> wrote:
> I guess I'm confused about the meaning of RawURL:
>
>        var req http.Request
>        req.Host = "google.com"
>        req.RawURL = "http://www.google.com"
>
> That writes out:
>
> GET http://www.google.com HTTP/1.1
> Host: google.com
> User-Agent: Go http package
>
> Which is malformed.

The definition of RawURL is whatever you want to put after the word GET.
If you put something malformed there, it will generate a malformed request.
It's that simple.

And, by the way, the request above is not malformed.
Not common perhaps, but definitely valid.

Russ
Sign in to reply to this message.

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