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

Issue 4185053: code review 4185053: http: introduce Header type, implement with net/textproto (Closed)

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

Description

http: introduce Header type, implement with net/textproto textproto: introduce Header type websocket: use new interface to access Header

Patch Set 1 #

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

Total comments: 8

Patch Set 3 : diff -r 4892f94182a5 https://go.googlecode.com/hg/ #

Total comments: 65

Patch Set 4 : diff -r 4892f94182a5 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 4892f94182a5 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 6 : diff -r 8e157f1abc87 https://go.googlecode.com/hg/ #

Total comments: 38

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

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

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

Patch Set 10 : diff -r 2058371f94f0 https://go.googlecode.com/hg/ #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+263 lines, -335 lines) Patch
M src/pkg/http/Makefile View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/http/client.go View 1 2 3 4 5 6 5 chunks +9 lines, -9 lines 0 comments Download
M src/pkg/http/fs.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/http/fs_test.go View 1 2 3 4 3 chunks +6 lines, -5 lines 0 comments Download
A src/pkg/http/header.go View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
M src/pkg/http/readrequest_test.go View 1 2 3 2 chunks +9 lines, -9 lines 0 comments Download
M src/pkg/http/request.go View 1 2 3 4 5 11 chunks +24 lines, -154 lines 0 comments Download
M src/pkg/http/request_test.go View 1 2 3 4 5 chunks +11 lines, -9 lines 0 comments Download
M src/pkg/http/requestwrite_test.go View 1 2 3 4 5 6 7 8 9 4 chunks +10 lines, -10 lines 0 comments Download
M src/pkg/http/response.go View 1 2 3 4 5 6 7 chunks +25 lines, -51 lines 0 comments Download
M src/pkg/http/response_test.go View 1 2 3 4 5 6 6 chunks +9 lines, -9 lines 0 comments Download
M src/pkg/http/responsewrite_test.go View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/http/serve_test.go View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/http/transfer.go View 1 2 3 4 5 6 10 chunks +28 lines, -35 lines 0 comments Download
M src/pkg/net/textproto/Makefile View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A src/pkg/net/textproto/header.go View 1 2 3 1 chunk +43 lines, -0 lines 0 comments Download
M src/pkg/net/textproto/reader.go View 1 2 3 4 5 6 4 chunks +8 lines, -8 lines 0 comments Download
M src/pkg/net/textproto/reader_test.go View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/websocket/client.go View 1 2 3 2 chunks +10 lines, -10 lines 0 comments Download
M src/pkg/websocket/server.go View 1 2 3 4 5 6 4 chunks +16 lines, -16 lines 0 comments Download

Messages

Total messages: 36
petar-m
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 2 months ago (2011-02-15 23:46:25 UTC) #1
mattn
http://codereview.appspot.com/4185053/diff/2001/src/pkg/http/response.go File src/pkg/http/response.go (right): http://codereview.appspot.com/4185053/diff/2001/src/pkg/http/response.go#newcode169 src/pkg/http/response.go:169: func GetFirstValue(header map[string][]string, key string) string { GetFirstHeaderValue? http://codereview.appspot.com/4185053/diff/2001/src/pkg/websocket/server.go ...
13 years, 2 months ago (2011-02-16 01:02:20 UTC) #2
rsc
I started doing this a few weeks ago but got sidetracked. Thanks for looking at ...
13 years, 2 months ago (2011-02-16 04:27:47 UTC) #3
petar-m
This is a fair suggestion. Maybe for this or the next CL. Let's see what ...
13 years, 2 months ago (2011-02-16 07:07:18 UTC) #4
rsc
Thanks for cleaning this up. I agree with the suggestion about having a Header type, ...
13 years, 2 months ago (2011-02-16 23:04:43 UTC) #5
petar-m
I've already implemented the cookie mechanism, factoring your concerns. It is coming in the CL ...
13 years, 2 months ago (2011-02-17 00:41:30 UTC) #6
petar-m
textproto.MIMEHeader created http: adjusted for change http://codereview.appspot.com/4185053/diff/2001/src/pkg/http/response.go File src/pkg/http/response.go (right): http://codereview.appspot.com/4185053/diff/2001/src/pkg/http/response.go#newcode169 src/pkg/http/response.go:169: func GetFirstValue(header map[string][]string, ...
13 years, 2 months ago (2011-02-17 16:57:01 UTC) #7
petar-m
Hello rsc, mattn (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 2 months ago (2011-02-17 16:57:16 UTC) #8
petar-m
Also, I think that textproto.CanonicalHeaderKey should be renamed to textproto.CanonicalMIMEKey On 2011/02/17 16:57:16, petar-m wrote: ...
13 years, 2 months ago (2011-02-17 17:11:50 UTC) #9
rsc
The new MIMEHeader code in textproto looks good. Bunch of comments about usage in http ...
13 years, 2 months ago (2011-02-17 19:17:07 UTC) #10
petar-m
All done. http://codereview.appspot.com/4185053/diff/3017/src/pkg/http/client.go File src/pkg/http/client.go (left): http://codereview.appspot.com/4185053/diff/3017/src/pkg/http/client.go#oldcode34 src/pkg/http/client.go:34: // matchNoProxy returns true if requests to ...
13 years, 2 months ago (2011-02-18 01:18:01 UTC) #11
petar-m
Hello rsc, mattn (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 2 months ago (2011-02-18 01:22:53 UTC) #12
petar-m
Hello rsc, mattn (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 2 months ago (2011-02-18 01:30:20 UTC) #13
mattn
http://codereview.appspot.com/4185053/diff/13001/src/pkg/http/client.go File src/pkg/http/client.go (left): http://codereview.appspot.com/4185053/diff/13001/src/pkg/http/client.go#oldcode93 src/pkg/http/client.go:93: var proxyURL *URL It seems that proxy support was ...
13 years, 2 months ago (2011-02-18 01:39:44 UTC) #14
petar-m
Done. http://codereview.appspot.com/4185053/diff/13001/src/pkg/http/client.go File src/pkg/http/client.go (left): http://codereview.appspot.com/4185053/diff/13001/src/pkg/http/client.go#oldcode93 src/pkg/http/client.go:93: var proxyURL *URL On 2011/02/18 01:39:44, mattn wrote: ...
13 years, 2 months ago (2011-02-18 12:33:17 UTC) #15
petar-m
Hello rsc, mattn (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 2 months ago (2011-02-18 12:33:33 UTC) #16
mattn
That's not the point, I got test fail. This is relative problem issue 4177042. http://codereview.appspot.com/4177042/ ...
13 years, 2 months ago (2011-02-18 13:26:56 UTC) #17
mattn
I got PASS with 4177042 just now. On 2011/02/18 13:26:56, mattn wrote: > That's not ...
13 years, 2 months ago (2011-02-18 13:31:06 UTC) #18
rsc
> rsc, Shall we fix 4177042 in this time? > Of course, I should check ...
13 years, 2 months ago (2011-02-18 13:52:59 UTC) #19
rsc
This looks great. I like how this turned out. http://codereview.appspot.com/4185053/diff/16001/src/pkg/http/client.go File src/pkg/http/client.go (right): http://codereview.appspot.com/4185053/diff/16001/src/pkg/http/client.go#newcode136 src/pkg/http/client.go:136: ...
13 years, 2 months ago (2011-02-22 21:53:44 UTC) #20
petar-m
K. http://codereview.appspot.com/4185053/diff/16001/src/pkg/http/client.go File src/pkg/http/client.go (right): http://codereview.appspot.com/4185053/diff/16001/src/pkg/http/client.go#newcode136 src/pkg/http/client.go:136: conn, err = tls.Dial("tcp", "", addr, nil) On ...
13 years, 2 months ago (2011-02-22 23:18:44 UTC) #21
petar-m
Hello rsc, mattn (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 2 months ago (2011-02-22 23:18:45 UTC) #22
rsc
LGTM sorry about the proxy diff trouble.
13 years, 2 months ago (2011-02-22 23:22:09 UTC) #23
rsc
Please change CL description to http: introduce Header type, implement with net/textproto textproto: introduce Header ...
13 years, 2 months ago (2011-02-22 23:26:29 UTC) #24
petar-m
Hello rsc, mattn (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 2 months ago (2011-02-22 23:44:32 UTC) #25
petar-m
—Petar On Tuesday, February 22, 2011 at 6:26 PM, Russ Cox wrote: > Please change ...
13 years, 2 months ago (2011-02-22 23:47:19 UTC) #26
petar-m
Oh, got it. Added reader_test.go On 22 February 2011 18:44, <petarm@gmail.com> wrote: > Hello rsc, ...
13 years, 2 months ago (2011-02-22 23:49:15 UTC) #27
petar-m
Hello rsc, mattn (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 2 months ago (2011-02-22 23:49:17 UTC) #28
rsc
I think reader_test.go is missing from the CL. Russ On Feb 22, 2011 6:47 PM, ...
13 years, 2 months ago (2011-02-22 23:53:56 UTC) #29
rsc
I'm sorry to keep bouncing this back to you, but I ran all.bash and it ...
13 years, 2 months ago (2011-02-23 04:04:49 UTC) #30
petar-m
Yep ... I'll take care, no worries. --P On 22 February 2011 23:04, Russ Cox ...
13 years, 2 months ago (2011-02-23 04:30:52 UTC) #31
petar-m
Hello rsc, mattn (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 2 months ago (2011-02-23 05:14:42 UTC) #32
rsc
gotest works in http and websocket but it fails in net/textproto $ gotest rm -f ...
13 years, 2 months ago (2011-02-23 05:19:53 UTC) #33
petar-m
Hello rsc, mattn (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 2 months ago (2011-02-23 05:25:09 UTC) #34
rsc
LGTM Nice catch in the net/textproto fix. I had no idea what was wrong. Russ
13 years, 2 months ago (2011-02-23 05:38:47 UTC) #35
rsc
13 years, 2 months ago (2011-02-23 05:39:31 UTC) #36
*** Submitted as http://code.google.com/p/go/source/detail?r=8876943e2918 ***

http: introduce Header type, implement with net/textproto
textproto: introduce Header type
websocket: use new interface to access Header

R=rsc, mattn
CC=golang-dev
http://codereview.appspot.com/4185053

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