-
Notifications
You must be signed in to change notification settings - Fork 18.1k
net/http: upon http redirect, Request.GetBody is always nil #73439
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
Labels
BugReport
Issues describing a possible bug in the Go implementation.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Comments
Change https://go.dev/cl/666735 mentions this issue: |
Sirherobrine23
pushed a commit
to Sirherobrine23/go
that referenced
this issue
May 24, 2025
This enable http.RoundTripper implementation to retry POST request (let's say after a 500) after a 307/308 redirect. Fixes golang#73439 Change-Id: I4365ff58b012c7f0d60e0317a08c98b1d48f657e Reviewed-on: https://go-review.googlesource.com/c/go/+/666735 Reviewed-by: Sean Liao <[email protected]> Auto-Submit: Damien Neil <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Damien Neil <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
BugReport
Issues describing a possible bug in the Go implementation.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Go version
go version devel go1.25-252c939445 Fri Apr 18 08:30:30 2025 -0700 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Implement a http.RoundTripper that leverages http.Request.GetBody. Handle a server that returns 307/308 on a POST.
What did you see happen?
http.Request.GetBody is always nil after a HTTP redirect.
What did you expect to see?
http.Request.GetBody is copied over so the RoundTripper can rewind the request body if needed.
The text was updated successfully, but these errors were encountered: