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

x/net/http2: server writes after timeout should return os.ErrDeadlineExceeded #56478

Open
neild opened this issue Oct 28, 2022 · 2 comments
Open
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@neild
Copy link
Contributor

neild commented Oct 28, 2022

A HTTP/2 handler that writes to the ResponseWriter after Server.WriteTimeout has expired gets a http2: stream closed error. It should get an error for which errors.Is(err, os.ErrDeadlineExceeded) is true.

@gopherbot
Copy link

gopherbot commented Oct 28, 2022

Change https://go.dev/cl/446255 mentions this issue: net/http: add tests for Server.ReadTimeout and server.WriteTimeout

@gopherbot
Copy link

gopherbot commented Oct 28, 2022

Change https://go.dev/cl/446257 mentions this issue: http2: return os.ErrDeadlineExceeded from timed-out response body writes

@seankhliao seankhliao added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 1, 2022
gopherbot pushed a commit to golang/net that referenced this issue Nov 4, 2022
When a server handler writes to a response body after Server.WriteTimeout
has expired, return an error matching os.ErrDeadlineExceeded rather than
"http2: stream closed".

Tested by net/http CL 446255.

For golang/go#56478

Change-Id: I94494cc7e7f8f9a01a663de09fd5b73acc8ea4e4
Reviewed-on: https://go-review.googlesource.com/c/net/+/446257
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
gopherbot pushed a commit that referenced this issue Nov 10, 2022
We don't seem to have tests verifying that handler reads from the
request body or writes to the response body time out properly.
Add some.

For #49837
For #56478

Change-Id: I0828edd6c86b071073fd1b22ccbb24f86114ab94
Reviewed-on: https://go-review.googlesource.com/c/go/+/446255
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
WeiminShang added a commit to WeiminShang/net that referenced this issue Nov 16, 2022
When a server handler writes to a response body after Server.WriteTimeout
has expired, return an error matching os.ErrDeadlineExceeded rather than
"http2: stream closed".

Tested by net/http CL 446255.

For golang/go#56478

Change-Id: I94494cc7e7f8f9a01a663de09fd5b73acc8ea4e4
Reviewed-on: https://go-review.googlesource.com/c/net/+/446257
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
@seankhliao seankhliao modified the milestones: Unplanned, Go1.20 Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants