net/http: HTTP request hangs when dumping non-nil body using httputil.DumpRequestOut #18506
Comments
/cc @bradfitz |
I verified that this was already fixed by 6e36811 which makes me feel better about that fix. I'll send out a second minor fix to httputil to recognize NoBody specially. |
CL https://golang.org/cl/34814 mentions this issue. |
so that's why my DEBUG_HTTP_TRAFFIC flag has been dumping chunked requests! thanks for the patch! https://github.com/kevinburke/rest/blob/master/client.go#L110-L134 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (
go version
)?go1.8beta2
What operating system and processor architecture are you using (
go env
)?windows/amd64
What did you do?
When running below sample program the program hangs on
http.DefaultClient.Do(req)
What did you expect to see?
401 Unauthorized
What did you see instead?
Nothing (hangs for minutes)
Other info
I expect this also has something to do with the server side because when using a different URL everything is OK.
But since this code runs fine on Go 1.7.3 and earlier I expect it is a bug in 1.8.
Note: In the go1.7 code we use a
new(bytes.Buffer)
instead ofhttp.NoBody
in a function that does GET, PUT and POST requests, so only in the GET requests will have an empty buffer.nil
Possibly related to #18117 ?
The text was updated successfully, but these errors were encountered: