Skip to content
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

net/http: RoundTrip unexpectedly changes Request [1.14 backport] #40973

Closed
gopherbot opened this issue Aug 22, 2020 · 3 comments
Closed

net/http: RoundTrip unexpectedly changes Request [1.14 backport] #40973

gopherbot opened this issue Aug 22, 2020 · 3 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Aug 22, 2020

@dmitshur requested issue #39533 to be considered for backport to the next 1.14 minor release.

@gopherbot Please backport to Go 1.14.

This is a fixup to a previous fix (CL 242117) for an approved backport issue #39279. We can't submit that CL without this one. This needs to be backported to Go 1.14 only, since the fix is already included in Go 1.1​5.

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Aug 22, 2020

Change https://golang.org/cl/249880 mentions this issue: [release-branch.go1.14] net/http: make Transport.RoundTrip preserve Requests

@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Aug 27, 2020

Approved because this is a critical problem without a workaround.

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Aug 27, 2020

Closed by merging fae8e09 to release-branch.go1.14.

@gopherbot gopherbot closed this Aug 27, 2020
gopherbot pushed a commit that referenced this issue Aug 27, 2020
…equests

Ensure that the exact Request passed to Transport.RoundTrip
is returned in the Response. Do not replace the Request with
a copy when resetting the request body.

Updates #39533.
Fixes #40973.

Change-Id: Ie6fb080c24b0f6625b0761b7aa542af3d2411817
Reviewed-on: https://go-review.googlesource.com/c/go/+/237560
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/249880
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
@dmitshur dmitshur modified the milestones: Go1.14.8, Go1.14.9 Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.