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

Issue 8101043: code review 8101043: net/http: more tests, better comments, remove an allocation (Closed)

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

Description

net/http: more tests, better comments, remove an allocation Add more tests around the various orders handlers can access and flush response headers. Also clarify the documentation on fields of response and chunkWriter. While there, remove an allocation (a header clone) for simple handlers. benchmark old ns/op new ns/op delta BenchmarkServerFakeConnWithKeepAliveLite 15245 14966 -1.83% benchmark old allocs new allocs delta BenchmarkServerFakeConnWithKeepAliveLite 24 23 -4.17% benchmark old bytes new bytes delta BenchmarkServerFakeConnWithKeepAliveLite 1717 1668 -2.85%

Patch Set 1 #

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

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

Total comments: 4

Patch Set 4 : diff -r 457cc24872ec https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+265 lines, -9 lines) Patch
M src/pkg/net/http/serve_test.go View 1 3 chunks +222 lines, -0 lines 0 comments Download
M src/pkg/net/http/server.go View 1 2 3 6 chunks +43 lines, -9 lines 0 comments Download

Messages

Total messages: 3
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 11 months ago (2013-03-28 17:26:57 UTC) #1
gri
LGTM https://codereview.appspot.com/8101043/diff/5001/src/pkg/net/http/server.go File src/pkg/net/http/server.go (right): https://codereview.appspot.com/8101043/diff/5001/src/pkg/net/http/server.go#newcode231 src/pkg/net/http/server.go:231: // wroteHeader is whether the header's been sent. ...
11 years, 11 months ago (2013-03-28 18:21:42 UTC) #2
bradfitz
11 years, 11 months ago (2013-03-28 18:35:29 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=833bf2ef1527 ***

net/http: more tests, better comments, remove an allocation

Add more tests around the various orders handlers can access
and flush response headers.

Also clarify the documentation on fields of response and
chunkWriter.

While there, remove an allocation (a header clone) for simple
handlers.

benchmark                                   old ns/op    new ns/op    delta
BenchmarkServerFakeConnWithKeepAliveLite        15245        14966   -1.83%

benchmark                                  old allocs   new allocs    delta
BenchmarkServerFakeConnWithKeepAliveLite           24           23   -4.17%

benchmark                                   old bytes    new bytes    delta
BenchmarkServerFakeConnWithKeepAliveLite         1717         1668   -2.85%

R=golang-dev, gri
CC=golang-dev
https://codereview.appspot.com/8101043

https://codereview.appspot.com/8101043/diff/5001/src/pkg/net/http/server.go
File src/pkg/net/http/server.go (right):

https://codereview.appspot.com/8101043/diff/5001/src/pkg/net/http/server.go#n...
src/pkg/net/http/server.go:231: // wroteHeader is whether the header's been
sent.  unlike
On 2013/03/28 18:21:42, gri wrote:
> s/is/reports/ ?
> s/is/tells/ ?

done, and reordered a bit for clarity.

https://codereview.appspot.com/8101043/diff/5001/src/pkg/net/http/server.go#n...
src/pkg/net/http/server.go:232: // (*response).wroteHeader, this one is whether
the header
On 2013/03/28 18:21:42, gri wrote:
> is -> tells ?

Done.
Sign in to reply to this message.

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