http2: fix subsequent end calls to not throw#15414
Closed
apapirovski wants to merge 1 commit intonodejs:masterfrom
Closed
http2: fix subsequent end calls to not throw#15414apapirovski wants to merge 1 commit intonodejs:masterfrom
apapirovski wants to merge 1 commit intonodejs:masterfrom
Conversation
jasnell
approved these changes
Sep 14, 2017
Calling Http2ServerResponse.end multiple times should never cause the code to throw an error, subsequent calls should instead return false. Fix behaviour to match http1. Fixes: https://github.com/nodejs/node/issues/15385m
9652050 to
8be7991
Compare
Contributor
Author
|
Forgot to sprinkle a couple of |
f2677e5 to
8be7991
Compare
lpinca
reviewed
Sep 14, 2017
| const server = createServer(mustCall((request, response) => { | ||
| strictEqual(response.closed, false); | ||
| response.on('finish', mustCall(() => process.nextTick( | ||
| mustCall(() => doesNotThrow(() => response.end('test', mustNotCall()))) |
Member
There was a problem hiding this comment.
Nit (feel free to ignore): mustCall seems redundant here. process.nextTick() callback is always called.
Member
Member
|
The failure is not related, landing. |
Member
|
Landed as a4e923f. |
mcollina
pushed a commit
that referenced
this pull request
Sep 18, 2017
Calling Http2ServerResponse.end multiple times should never cause the code to throw an error, subsequent calls should instead return false. Fix behaviour to match http1. Fixes: #15385 PR-URL: #15414 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
jasnell
pushed a commit
that referenced
this pull request
Sep 20, 2017
Calling Http2ServerResponse.end multiple times should never cause the code to throw an error, subsequent calls should instead return false. Fix behaviour to match http1. Fixes: #15385 PR-URL: #15414 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Qard
pushed a commit
to Qard/ayo
that referenced
this pull request
Sep 21, 2017
Calling Http2ServerResponse.end multiple times should never cause the code to throw an error, subsequent calls should instead return false. Fix behaviour to match http1. Fixes: nodejs/node#15385 PR-URL: nodejs/node#15414 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Qard
pushed a commit
to Qard/ayo
that referenced
this pull request
Sep 21, 2017
Calling Http2ServerResponse.end multiple times should never cause the code to throw an error, subsequent calls should instead return false. Fix behaviour to match http1. Fixes: nodejs/node#15385 PR-URL: nodejs/node#15414 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Calling
Http2ServerResponse.endmultiple times should never cause the code to throw an error, subsequent calls should instead return false. This adjusts the behaviour to match http1. Fixes #15385Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
http2, test