]> Cypherpunks repositories - gostls13.git/commit
net/http: return correct error when reading from a canceled request body
authorDamien Neil <dneil@google.com>
Thu, 16 May 2024 23:26:04 +0000 (16:26 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 17 May 2024 15:58:58 +0000 (15:58 +0000)
commita61729b880f731bf89f40c5c0366cdeb61108753
tree2dc509b7b1ff526bd17bc4a9f0a41dc683034537
parent2c635b68fdc8ddf83208ed2ec65eff09a3af58b8
net/http: return correct error when reading from a canceled request body

CL 546676 inadvertently changed the error returned when reading
from the body of a canceled request. Fix it.

Rework various request cancelation tests to exercise all three ways
of canceling a request.

Fixes #67439

Change-Id: I14ecaf8bff9452eca4a05df923d57d768127a90c
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-linux-amd64-longtest-race
Reviewed-on: https://go-review.googlesource.com/c/go/+/586315
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/net/http/transport.go
src/net/http/transport_test.go