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
Showing
Please
register
or
sign in
to comment