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

http2: emit close event if request aborted #15415

Closed

Conversation

apapirovski
Copy link
Member

@apapirovski apapirovski commented Sep 14, 2017

Fix Http2ServerRequest and Http2ServerResponse to emit close event if the request is aborted before response.end() can be called. The test is adapted from an equivalent test in http1 so this behaviour matches http1. This fully fixes #15385

Wasn't sure if we needed to check more than this.writable within onStreamAbortedResponse — welcome any other input on that (and the rest). Thanks!

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

http2, test

Fix Http2ServerRequest and Http2ServerResponse to emit close event
if the request is aborted before response.end can be called.

Fixes: nodejs#15385
@nodejs-github-bot nodejs-github-bot added the http2 Issues or PRs related to the http2 subsystem. label Sep 14, 2017
@jasnell jasnell requested a review from mcollina September 14, 2017 19:14
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mcollina
Copy link
Member

@mcollina
Copy link
Member

Landed as 8fa5fcc.

@mcollina mcollina closed this Sep 18, 2017
mcollina pushed a commit that referenced this pull request Sep 18, 2017
Fix Http2ServerRequest and Http2ServerResponse to emit close event
if the request is aborted before response.end can be called.

Fixes: #15385
PR-URL: #15415
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@apapirovski apapirovski deleted the patch-http2-compat-close-event branch September 19, 2017 13:59
jasnell pushed a commit that referenced this pull request Sep 20, 2017
Fix Http2ServerRequest and Http2ServerResponse to emit close event
if the request is aborted before response.end can be called.

Fixes: #15385
PR-URL: #15415
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Qard pushed a commit to Qard/ayo that referenced this pull request Sep 21, 2017
Fix Http2ServerRequest and Http2ServerResponse to emit close event
if the request is aborted before response.end can be called.

Fixes: nodejs/node#15385
PR-URL: nodejs/node#15415
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Qard pushed a commit to Qard/ayo that referenced this pull request Sep 21, 2017
Fix Http2ServerRequest and Http2ServerResponse to emit close event
if the request is aborted before response.end can be called.

Fixes: nodejs/node#15385
PR-URL: nodejs/node#15415
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http2: client browser refresh crashing the server.
5 participants