-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
http: free the parser before emitting 'upgrade' #18209
Conversation
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event.
Would you be able to add a test case for the server-freeing-the-parser behavior as well? Otherwise LGTM |
cc @nodejs/http |
@maclover7 the included test does that. |
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.
LGTM, good catch.
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event. PR-URL: nodejs#18209 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Landed in 93f1d9e |
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event. PR-URL: #18209 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event. PR-URL: #18209 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
should this land on v6.x or v8.x? It lands cleanly for both |
@MylesBorins yes it should imho. |
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event. PR-URL: #18209 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event. PR-URL: #18209 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event. PR-URL: #18209 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event. PR-URL: #18209 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event. PR-URL: #18209 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event. PR-URL: #18209 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Ensure that the parser is freed before emitting the 'connect' or 'upgrade' event. PR-URL: nodejs#18209 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
The reason for this change is mainly to be consistent with the server but also to prevent an error from being thrown in the unlikely case where the user assigns something to the
parser
property when the'upgrade'
event is emitted.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
http