You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 of http.NoBody in a function that does GET, PUT and POST requests, so only in the GET requests will have an empty buffer.
The program works when compiling in versions < 1.8beta1
The program works when setting the body to nil
The program also works if you do not dump the request
The text was updated successfully, but these errors were encountered:
rakyll
changed the title
1.8beta2: HTTP request hangs when dumping non-nil body using httputil.DumpRequestOut
net/http: HTTP request hangs when dumping non-nil body using httputil.DumpRequestOut
Jan 3, 2017
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: