★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/18209Nouvelle recherche | Portail wanayoo
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.
@maclover7
Copy link
Member

@maclover7 maclover7 commented Jan 18, 2018

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

@maclover7
Copy link
Member

@maclover7 maclover7 commented Jan 18, 2018

@lpinca
Copy link
Member Author

@lpinca lpinca commented Jan 18, 2018

@maclover7 the included test does that.

@addaleax
Copy link
Member

@addaleax addaleax commented Jan 18, 2018

Copy link
Member

@indutny indutny left a comment

LGTM, good catch.

BridgeAR added a commit to BridgeAR/node that referenced this issue 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

@BridgeAR BridgeAR commented Jan 21, 2018

Landed in 93f1d9e

@BridgeAR BridgeAR closed this Jan 21, 2018
@lpinca lpinca deleted the free/parser-asap branch Jan 24, 2018
evanlucas added a commit that referenced this issue 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 added a commit that referenced this issue 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

@MylesBorins MylesBorins commented Feb 27, 2018

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

@lpinca
Copy link
Member Author

@lpinca lpinca commented Feb 27, 2018

@MylesBorins yes it should imho.

MylesBorins added a commit that referenced this issue 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 added a commit that referenced this issue 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 added a commit that referenced this issue 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 added a commit that referenced this issue 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 added a commit that referenced this issue 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 added a commit that referenced this issue 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 added a commit to MayaLekova/node that referenced this issue 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants