-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http: request.Body.Close() can be called after RoundTrip() returns #58521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
what's your full test code? |
It's full code from main function. In another hand just web server handling post requests on 8080 port.
|
That's not enough to reproduce the issue, it may be that your server is breaking the connection |
You may run for example nginx and test previous code: or use something like that
But if we allocate variables for every request then code works fine:
|
Duplicate of #51907 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
reusing without errors
What did you see instead?
2023/02/14 14:52:48 [7] Post "http://127.0.0.1:12345": net/http: HTTP/1.x transport connection broken: http: ContentLength=1048576 with Body length 1015808
The text was updated successfully, but these errors were encountered: