]> Cypherpunks repositories - gostls13.git/commit
net/http: add Transport.CancelRequest
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 27 Feb 2013 23:20:13 +0000 (15:20 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 27 Feb 2013 23:20:13 +0000 (15:20 -0800)
commit11776a39a118742b61510a3ef3bfa2a80e4b3005
tree588e43c40ea856ee0dbf9433c610ca48d8754445
parente97aa82c2f05dcce6a875d69ea2d88dff04f000a
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 #3362
Update #3672

R=golang-dev, rsc, adg
CC=golang-dev
https://golang.org/cl/7372054
src/pkg/net/http/export_test.go
src/pkg/net/http/transport.go
src/pkg/net/http/transport_test.go