]> Cypherpunks repositories - gostls13.git/commit
net/http: make client await response concurrently with writing request
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 19 Jun 2012 16:20:41 +0000 (09:20 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 19 Jun 2012 16:20:41 +0000 (09:20 -0700)
commita5aa91b9a2a013be9ced9ae05474e1dce2fe16d4
tree51e3e424eab92ba5215580a7b0aa4c7fd034b833
parente1d9fcd267e1a827e9841dce4c91def0777a90ee
net/http: make client await response concurrently with writing request

If the server replies with an HTTP response before we're done
writing our body (for instance "401 Unauthorized" response), we
were previously ignoring that, since we returned our write
error ("broken pipe", etc) before ever reading the response.
Now we read and write at the same time.

Fixes #3595

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