Descriptionnet/http/httputil: fix race in DumpRequestOut
Fixes issue 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.
Patch Set 1 #Patch Set 2 : diff -r c552fb2b6a6c https://code.google.com/p/go #Patch Set 3 : diff -r c552fb2b6a6c https://code.google.com/p/go #Patch Set 4 : diff -r c552fb2b6a6c https://code.google.com/p/go #Patch Set 5 : diff -r c552fb2b6a6c https://code.google.com/p/go #
Total comments: 4
Patch Set 6 : diff -r c552fb2b6a6c https://code.google.com/p/go #Patch Set 7 : diff -r c552fb2b6a6c https://code.google.com/p/go #
Total comments: 1
Patch Set 8 : diff -r c552fb2b6a6c https://code.google.com/p/go #Patch Set 9 : diff -r 288d68924d65 https://go.googlecode.com/hg/ #MessagesTotal messages: 14
|