Commit 90176421 authored by Damien Neil's avatar Damien Neil Committed by Dmitri Shuralyov
Browse files

[release-branch.go1.14] net/http: fix cancelation of requests with a 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 <dneil@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarRuss Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/250299


Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: default avatarDamien Neil <dneil@google.com>
parent fae8e09d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment