Descriptionnet/http: fix data race when sharing request body between client and server
A server Handler (e.g. a proxy) can receive a Request, and
then turn around and give a copy of that Request.Body out to
the Transport. So then two goroutines own that Request.Body
(the server and the http client), and both think they can
close it on failure. Therefore, all incoming server requests
bodies (always *http.body from transfer.go) need to be
thread-safe.
Fixes Issue 6995
Patch Set 1 #Patch Set 2 : diff -r 119aee4343a6 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 119aee4343a6 https://go.googlecode.com/hg/ #Patch Set 4 : diff -r 1b7c5daffdff https://go.googlecode.com/hg/ #Patch Set 5 : diff -r 1b7c5daffdff https://go.googlecode.com/hg/ #
Total comments: 3
Patch Set 6 : diff -r b12d73776439 https://go.googlecode.com/hg/ #
MessagesTotal messages: 7
|