-
Notifications
You must be signed in to change notification settings - Fork 29.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
http2: do no throw in writeHead if state.closed #27682
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change is LGTM. Should we not change the behavior in http
to throw an error as well instead? Writing while already closed seems wrong?
That would break a significant number of applications unfortunately. Most applications and frameworks relies on the fact that calling |
The http1 implementation does not throw if the connection is down. The http2 compat implementation should do the same. See: fastify/fastify-http-proxy#51. See: fastify/fastify#1494.
003cef5
to
04c715f
Compare
1 similar comment
Landed in a49ab0f |
The http1 implementation does not throw if the connection is down. The http2 compat implementation should do the same. See: fastify/fastify-http-proxy#51. See: fastify/fastify#1494. PR-URL: #27682 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
The http1 implementation does not throw if the connection is down. The http2 compat implementation should do the same. See: fastify/fastify-http-proxy#51. See: fastify/fastify#1494. PR-URL: #27682 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
I think it's still not completely fixed, getting the issue a bit later here: It does not throw when using http1, but does when using http2 compat implemenation |
@mokimo would you mind opening a new issue with instructions on how to reproduce? (ideally a server + client that calls it). |
If I can get a simple example running that'd be perfect... Been unsuccessful so far but will give you a quick ping you once I got something hands-on |
The http1 implementation does not throw if the connection is down.
The http2 compat implementation should do the same.
See: fastify/fastify-http-proxy#51.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes