]> Cypherpunks repositories - gostls13.git/commit
net/http: make timeout errors match context.DeadlineExceeded
authorDamien Neil <dneil@google.com>
Tue, 27 Feb 2024 22:53:33 +0000 (14:53 -0800)
committerDamien Neil <dneil@google.com>
Wed, 28 Feb 2024 17:11:55 +0000 (17:11 +0000)
commit606b8ff5eff5e83e92b5b7466f9682115c1a6883
tree20d786f075a86c08bb3cf0f8ae45ca415d390ff4
parentb6753baaedf6ae932c3ad4af1451163045e7ff84
net/http: make timeout errors match context.DeadlineExceeded

When returning an error which implements net.Error and reports
itself as a timeout, also report it as matching context.DeadlineExceeded.
This matches the behavior of timeout errors in the net package
and elsewhere.

Fixes #50856

Change-Id: I2ca911e3677a699af27ba89b1200401baa8b3b1b
Reviewed-on: https://go-review.googlesource.com/c/go/+/567537
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/net/http/client.go
src/net/http/client_test.go
src/net/http/transport.go