]> Cypherpunks repositories - gostls13.git/commit
net/http: in Client, consume small redirect bodies before making next request
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 3 Mar 2014 19:25:57 +0000 (11:25 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 3 Mar 2014 19:25:57 +0000 (11:25 -0800)
commit76cc0a271286b7facfd5233d56737a3d92dd9670
tree47798daff66831368362cab406a820855597f29a
parentebe1eb6537d4873863db4a526250a0e5ddab41b2
net/http: in Client, consume small redirect bodies before making next request

In Go 1.2, closing a request body without reading to EOF
causes the underlying TCP connection to not be reused. This
client code following redirects was never updated when that
happened.

This was part of a previous CL but moved to its own CL at
Josh's request.  Now with test too.

LGTM=josharian
R=josharian
CC=golang-codereviews
https://golang.org/cl/70800043
src/pkg/net/http/client.go
src/pkg/net/http/client_test.go