• Dave Cheney's avatar
    net/http/httputil: fix race in DumpRequestOut · f8d4bb88
    Dave Cheney authored
    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
    f8d4bb88
dump.go 5.82 KB