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

http: free the parser before emitting 'upgrade' #18209

Closed
wants to merge 1 commit into from

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Jan 17, 2018

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

http

Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.
@nodejs-github-bot nodejs-github-bot added the http Issues or PRs related to the http subsystem. label Jan 17, 2018
@maclover7
Copy link
Contributor

Would you be able to add a test case for the server-freeing-the-parser behavior as well? Otherwise LGTM

@maclover7
Copy link
Contributor

cc @nodejs/http

@lpinca
Copy link
Member Author

lpinca commented Jan 18, 2018

@maclover7 the included test does that.

@addaleax
Copy link
Member

Copy link
Member

@indutny indutny left a comment

Choose a reason for hiding this comment

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

LGTM, good catch.

@maclover7 maclover7 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 20, 2018
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Jan 21, 2018
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.

PR-URL: nodejs#18209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@BridgeAR
Copy link
Member

Landed in 93f1d9e

@BridgeAR BridgeAR closed this Jan 21, 2018
@lpinca lpinca deleted the free/parser-asap branch January 24, 2018 15:45
evanlucas pushed a commit that referenced this pull request Jan 30, 2018
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.

PR-URL: #18209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
evanlucas pushed a commit that referenced this pull request Jan 30, 2018
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.

PR-URL: #18209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@MylesBorins
Copy link
Member

should this land on v6.x or v8.x? It lands cleanly for both

@lpinca
Copy link
Member Author

lpinca commented Feb 27, 2018

@MylesBorins yes it should imho.

MylesBorins pushed a commit that referenced this pull request Mar 20, 2018
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.

PR-URL: #18209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Mar 20, 2018
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.

PR-URL: #18209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Mar 28, 2018
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.

PR-URL: #18209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Mar 28, 2018
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.

PR-URL: #18209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Mar 30, 2018
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.

PR-URL: #18209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Mar 30, 2018
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.

PR-URL: #18209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@MylesBorins MylesBorins mentioned this pull request Apr 13, 2018
@MylesBorins MylesBorins mentioned this pull request May 2, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.

PR-URL: nodejs#18209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants