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

Issue 7372054: code review 7372054: net/http: add Transport.CancelRequest (Closed)

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

Description

net/http: add Transport.CancelRequest Permits all sorts of custom HTTP timeout policies without adding a new Transport timeout Duration for each combination of HTTP phases. This keeps track internally of which TCP connection a given Request is on, and lets callers forcefully close the TCP connection for a given request, without actually getting the net.Conn directly. Additionally, a future CL will implement res.Body.Close (Issue 3672) in terms of this. Update issue 3362 Update issue 3672

Patch Set 1 #

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

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

Total comments: 2

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -18 lines) Patch
M src/pkg/net/http/export_test.go View 1 2 chunks +10 lines, -4 lines 0 comments Download
M src/pkg/net/http/transport.go View 1 11 chunks +45 lines, -13 lines 0 comments Download
M src/pkg/net/http/transport_test.go View 1 2 chunks +54 lines, -1 line 0 comments Download

Messages

Total messages: 6
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 1 month ago (2013-02-27 17:12:36 UTC) #1
rsc
API LGTM
11 years, 1 month ago (2013-02-27 23:09:02 UTC) #2
bradfitz
R=adg for code review? On Wed, Feb 27, 2013 at 3:09 PM, <rsc@golang.org> wrote: > ...
11 years, 1 month ago (2013-02-27 23:09:47 UTC) #3
adg
LGTM https://codereview.appspot.com/7372054/diff/5001/src/pkg/net/http/transport_test.go File src/pkg/net/http/transport_test.go (right): https://codereview.appspot.com/7372054/diff/5001/src/pkg/net/http/transport_test.go#newcode1200 src/pkg/net/http/transport_test.go:1200: if d < 500*time.Millisecond { what about d ...
11 years, 1 month ago (2013-02-27 23:13:43 UTC) #4
bradfitz
https://codereview.appspot.com/7372054/diff/5001/src/pkg/net/http/transport_test.go File src/pkg/net/http/transport_test.go (right): https://codereview.appspot.com/7372054/diff/5001/src/pkg/net/http/transport_test.go#newcode1200 src/pkg/net/http/transport_test.go:1200: if d < 500*time.Millisecond { On 2013/02/27 23:13:43, adg ...
11 years, 1 month ago (2013-02-27 23:15:43 UTC) #5
bradfitz
11 years, 1 month ago (2013-02-27 23:20:15 UTC) #6
*** Submitted as https://code.google.com/p/go/source/detail?r=bcecef1cb2fd ***

net/http: add Transport.CancelRequest

Permits all sorts of custom HTTP timeout policies without
adding a new Transport timeout Duration for each combination
of HTTP phases.

This keeps track internally of which TCP connection a given
Request is on, and lets callers forcefully close the TCP
connection for a given request, without actually getting
the net.Conn directly.

Additionally, a future CL will implement res.Body.Close (Issue
3672) in terms of this.

Update issue 3362
Update issue 3672

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

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