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

Issue 4272045: code review 4272045: http: export Transport, add keep-alive support (Closed)

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

Description

http: export Transport, add keep-alive support This patch adds a connection cache and keep-alive support to Transport, which is used by the HTTP client. It's also structured such that it's easy to add HTTP pipelining in the future.

Patch Set 1 #

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

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

Patch Set 4 : diff -r 47d594612053 https://go.googlecode.com/hg/ #

Total comments: 6

Patch Set 5 : diff -r 61121e058bb8 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+736 lines, -137 lines) Patch
M src/pkg/http/client.go View 1 2 3 1 chunk +0 lines, -34 lines 0 comments Download
A src/pkg/http/export_test.go View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
M src/pkg/http/httptest/server.go View 1 2 3 4 chunks +30 lines, -2 lines 0 comments Download
M src/pkg/http/persist.go View 1 2 3 3 chunks +3 lines, -1 line 0 comments Download
M src/pkg/http/proxy_test.go View 1 2 3 4 1 chunk +16 lines, -14 lines 0 comments Download
M src/pkg/http/serve_test.go View 1 2 3 3 chunks +4 lines, -2 lines 0 comments Download
M src/pkg/http/transport.go View 1 2 3 4 4 chunks +452 lines, -81 lines 0 comments Download
M src/pkg/http/transport_test.go View 1 2 3 4 2 chunks +197 lines, -3 lines 0 comments Download

Messages

Total messages: 20
bradfitz
Hello rsc, petar-m (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years ago (2011-03-12 00:55:10 UTC) #1
bradfitz
Russ, Petar, I just realized I didn't use ClientConn for this. Looking at ClientConn again ...
14 years ago (2011-03-14 22:57:38 UTC) #2
rsc
ClientConn is meant for use in implementing proxies and other programs that care about managing ...
14 years ago (2011-03-14 23:04:45 UTC) #3
bradfitzgoog
Okay, I'll go re-read the ClientConn code and try to make it work. On Mon, ...
14 years ago (2011-03-14 23:20:26 UTC) #4
petar-m
I am travelling and can't go in detail, BUT: ClientConn is thread safe now. You ...
14 years ago (2011-03-14 23:53:00 UTC) #5
petar-m
So I had a chance to look slightly more carefully at your Transport stuff. In ...
14 years ago (2011-03-15 01:06:20 UTC) #6
rsc
Looked at the code briefly. I think Petar is correct that some of it would ...
14 years ago (2011-03-15 17:28:22 UTC) #7
bradfitz
Petar, I mostly re-did the patch with ClientConn. (not finished or uploaded) While parts got ...
13 years, 12 months ago (2011-03-18 00:40:40 UTC) #8
petar-m
This is not a shortcoming of the ClientConn design. ClientConn is designed around the principles ...
13 years, 12 months ago (2011-03-18 14:50:44 UTC) #9
rsc
> The job of ClientConn is to give you a function that reads. It's job ...
13 years, 12 months ago (2011-03-18 23:42:57 UTC) #10
bradfitz
I'm going to try to finish my ClientConn version. ClientConn lets me pass in the ...
13 years, 12 months ago (2011-03-19 01:43:32 UTC) #11
r
ClientConns to the left of them, ClientConns to the right of them. Into the valley ...
13 years, 12 months ago (2011-03-19 03:47:51 UTC) #12
bradfitz
Hello rsc, petar-m, bradfitzwork, r (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 11 months ago (2011-03-23 00:24:38 UTC) #13
bradfitz
I modified the $GOROOT/.hg/codereview/cl.4272045 file to modify the CL text but it got reverted. And ...
13 years, 11 months ago (2011-03-23 00:27:22 UTC) #14
rsc
On Tue, Mar 22, 2011 at 20:27, Brad Fitzpatrick <bradfitz@golang.org> wrote: > I modified the ...
13 years, 11 months ago (2011-03-23 01:36:20 UTC) #15
rsc
LGTM http://codereview.appspot.com/4272045/diff/14001/src/pkg/http/export_test.go File src/pkg/http/export_test.go (right): http://codereview.appspot.com/4272045/diff/14001/src/pkg/http/export_test.go#newcode10 src/pkg/http/export_test.go:10: func (t *Transport) GetIdleConnKeysForTesting() (keys []string) { s/Get// ...
13 years, 11 months ago (2011-03-23 13:42:18 UTC) #16
bradfitzgoog
Done. Submitting & waiting to see what I've broken. (I suspect FreeBSD at least, for ...
13 years, 11 months ago (2011-03-23 17:35:00 UTC) #17
rsc
> Submitting & waiting to see what I've broken. (I suspect FreeBSD at least, > ...
13 years, 11 months ago (2011-03-23 17:35:30 UTC) #18
bradfitz
*** Submitted as http://code.google.com/p/go/source/detail?r=ffbe9af96475 *** http: export Transport, add keep-alive support This patch adds a ...
13 years, 11 months ago (2011-03-23 17:38:26 UTC) #19
petar-m
13 years, 11 months ago (2011-03-23 17:41:38 UTC) #20
Just got a chance to look at this. Looks good ;)

--P


On 23 March 2011 13:38,  <bradfitz@golang.org> wrote:
> *** Submitted as
> http://code.google.com/p/go/source/detail?r=ffbe9af96475 ***
>
> http: export Transport, add keep-alive support
>
> This patch adds a connection cache and keep-alive
> support to Transport, which is used by the
> HTTP client.
>
> It's also structured such that it's easy to add
> HTTP pipelining in the future.
>
> R=rsc, petar-m, bradfitzwork, r
> CC=golang-dev
> http://codereview.appspot.com/4272045
>
>
> http://codereview.appspot.com/4272045/
>
Sign in to reply to this message.

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