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

Issue 5339041: code review 5339041: httputil: move dump and chunking functions out of http (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 4 months ago by bradfitz
Modified:
13 years, 4 months ago
Reviewers:
CC:
rsc, adg, golang-dev
Visibility:
Public.

Description

httputil: move dump and chunking functions out of http This moves DumpRequest, DumpResponse, NewChunkedReader, and NewChunkedWriter out of http, as part of the continued http diet plan. Also, adds DumpRequestOut (for dumping outbound requests), since DumpRequest's ambiguity (the "wire representation" in what direction?) was often a source of confusion and bug reports.

Patch Set 1 #

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

Patch Set 3 : diff -r 62a88d392930 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 322faa43dec6 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 5 : diff -r 322faa43dec6 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 322faa43dec6 https://go.googlecode.com/hg/ #

Total comments: 1

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -121 lines) Patch
M src/pkg/net/http/Makefile View 1 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/net/http/chunked.go View 1 2 chunks +2 lines, -21 lines 0 comments Download
M src/pkg/net/http/httputil/Makefile View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/pkg/net/http/httputil/chunked.go View 1 2 3 4 5 3 chunks +15 lines, -7 lines 0 comments Download
A src/pkg/net/http/httputil/chunked_test.go View 1 2 3 4 5 6 1 chunk +35 lines, -0 lines 0 comments Download
M src/pkg/net/http/httputil/dump.go View 1 2 3 4 4 chunks +138 lines, -12 lines 0 comments Download
A src/pkg/net/http/httputil/dump_test.go View 1 2 3 4 5 6 1 chunk +140 lines, -0 lines 0 comments Download
M src/pkg/net/http/request.go View 1 2 chunks +0 lines, -52 lines 0 comments Download
M src/pkg/net/http/requestwrite_test.go View 1 4 chunks +0 lines, -26 lines 0 comments Download
M src/pkg/net/http/transfer.go View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 18
bradfitz
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 4 months ago (2011-11-04 00:15:24 UTC) #1
rsc
I'm confused. How can the outgoing wire representation be different from the incoming wire representation? ...
13 years, 4 months ago (2011-11-04 00:26:04 UTC) #2
bradfitz
On Thu, Nov 3, 2011 at 5:26 PM, Russ Cox <rsc@golang.org> wrote: > I'm confused. ...
13 years, 4 months ago (2011-11-04 00:28:23 UTC) #3
bradfitz
The difference is the wire as we get it (as a Server) vs the wire ...
13 years, 4 months ago (2011-11-04 00:29:56 UTC) #4
rsc
Can we delete them?
13 years, 4 months ago (2011-11-04 00:30:00 UTC) #5
bradfitz
Well, I hate them less now, now that we have both halves, they're documented, and ...
13 years, 4 months ago (2011-11-04 00:31:30 UTC) #6
rsc
http://codereview.appspot.com/5339041/diff/8001/src/pkg/net/http/httputil/dump.go File src/pkg/net/http/httputil/dump.go (right): http://codereview.appspot.com/5339041/diff/8001/src/pkg/net/http/httputil/dump.go#newcode46 src/pkg/net/http/httputil/dump.go:46: // DumpRequestOut returns the outbound wire representation of req, ...
13 years, 4 months ago (2011-11-04 00:34:09 UTC) #7
rsc
LGTM Should the tests move too?
13 years, 4 months ago (2011-11-04 00:34:52 UTC) #8
bradfitz
On Thu, Nov 3, 2011 at 5:34 PM, <rsc@golang.org> wrote: > LGTM > > Should ...
13 years, 4 months ago (2011-11-04 00:36:43 UTC) #9
rsc
Missing a file in the CL? There are no httputil/*_test.go files.
13 years, 4 months ago (2011-11-04 00:38:48 UTC) #10
bradfitz
On Thu, Nov 3, 2011 at 5:38 PM, Russ Cox <rsc@golang.org> wrote: > Missing a ...
13 years, 4 months ago (2011-11-04 00:40:05 UTC) #11
bradfitz
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2011-11-04 00:46:51 UTC) #12
bradfitz
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2011-11-04 01:02:28 UTC) #13
bradfitz
Now with chunking tests. And the old dump tests actually in the CL. On Thu, ...
13 years, 4 months ago (2011-11-04 01:03:28 UTC) #14
adg
LGTM http://codereview.appspot.com/5339041/diff/15002/src/pkg/net/http/httputil/chunked_test.go File src/pkg/net/http/httputil/chunked_test.go (right): http://codereview.appspot.com/5339041/diff/15002/src/pkg/net/http/httputil/chunked_test.go#newcode21 src/pkg/net/http/httputil/chunked_test.go:21: if g, e := b.String(), "7\r\nhello, \r\n17\r\nworld! 0123456789abcdef\r\n0\r\n"; ...
13 years, 4 months ago (2011-11-04 01:06:59 UTC) #15
bradfitz
Done, to some degree. I don't want to replicate the code in the test, though, ...
13 years, 4 months ago (2011-11-04 01:09:59 UTC) #16
rsc
hg p only tells you if you have hg add'ed the file
13 years, 4 months ago (2011-11-04 01:11:08 UTC) #17
bradfitz
13 years, 4 months ago (2011-11-04 01:12:55 UTC) #18
*** Submitted as http://code.google.com/p/go/source/detail?r=37533e1cfe43 ***

httputil: move dump and chunking functions out of http

This moves DumpRequest, DumpResponse, NewChunkedReader,
and NewChunkedWriter out of http, as part of the continued
http diet plan.

Also, adds DumpRequestOut (for dumping outbound requests),
since DumpRequest's ambiguity (the "wire representation" in
what direction?) was often a source of confusion and bug
reports.

R=rsc, adg
CC=golang-dev
http://codereview.appspot.com/5339041
Sign in to reply to this message.

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