-
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
x/net/http2: server writes after timeout should return os.ErrDeadlineExceeded #56478
Comments
Change https://go.dev/cl/446255 mentions this issue: |
Change https://go.dev/cl/446257 mentions this issue: |
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>
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>
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>
@neild I believe you fixed this issue in https://go-review.googlesource.com/c/net/+/446257 hence I shall close this issue, please reopen if otherwise and thank you for reporting plus fixing it! |
A HTTP/2 handler that writes to the
ResponseWriter
afterServer.WriteTimeout
has expired gets ahttp2: stream closed
error. It should get an error for whicherrors.Is(err, os.ErrDeadlineExceeded)
is true.The text was updated successfully, but these errors were encountered: