-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: Transport.CancelRequest no longer cancels in-flight request #40453
Comments
Change https://golang.org/cl/245357 mentions this issue: |
@gopherbot Please backport to Go 1.14. This is a second fixup to a previous fix (CL 242117) for an approved backport issue #39279. We can't submit that CL without this one (and #40973). This needs to be backported to Go 1.14 only, since the fix is already included in Go 1.15. |
Backport issue(s) opened: #41016 (for 1.14). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/250299 mentions this issue: |
…readTrackingBody wrapper Use the original *Request in the reqCanceler map, not the transient wrapper created to handle body rewinding. Change the key of reqCanceler to a struct{*Request}, to make it more difficult to accidentally use the wrong request as the key. Updates #40453. Fixes #41016. Change-Id: I4e61ee9ff2c794fb4c920a3a66c9a0458693d757 Reviewed-on: https://go-review.googlesource.com/c/go/+/245357 Run-TryBot: Damien Neil <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Russ Cox <[email protected]> Reviewed-on: https://go-review.googlesource.com/c/go/+/250299 Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Damien Neil <[email protected]>
(*net/http.Transport).CancelRequest
's documentation states:Despite this warning,
CancelRequest
does usually cancel an in-flight request currently blocked inRoundTrip
. CL 234894 has inadvertently broken this for requests with a body.Crude reproduction case follows.
The text was updated successfully, but these errors were encountered: