[release-branch.go1] net/http/httputil: fix race in DumpRequestOut
««« backport
3b78b41a4b50
net/http/httputil: fix race in DumpRequestOut
Fixes #3892.
Swapping the order of the writers inside the MultiWriter ensures
the request will be written to buf before http.ReadRequest completes.
The fencedBuffer is not required to make the test pass on
any machine that I have access too, but as the buf is shared
across goroutines, I think it is necessary for correctness.
R=bradfitz, fullung, franciscossouza
CC=golang-dev
https://golang.org/cl/
6483061
»»»