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: fix undefined error in parser event #20029

Closed

Conversation

apapirovski
Copy link
Member

@apapirovski apapirovski commented Apr 14, 2018

The current check for socket.server[kIncomingMessage] does not account for the possibility of a socket.server that doesn't have that property defined. Fix it.

No test as this isn't officially supported behaviour but the fix is simple so we might as well do it to not break the ecosystem.

(Would be nice to get this in v10.x if possible.)

Fixes: #19231

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

The current check for socket.server[kIncomingMessage] does not
account for the possibility of a socket.server that doesn't
have that property defined. Fix it.
@apapirovski apapirovski added the http Issues or PRs related to the http subsystem. label Apr 14, 2018
@apapirovski apapirovski added this to the 10.0.0 milestone Apr 14, 2018
@nodejs-github-bot nodejs-github-bot added the http Issues or PRs related to the http subsystem. label Apr 14, 2018
@apapirovski
Copy link
Member Author

@bnoordhuis
Copy link
Member

There's that make[2]: write error thing on the plinux bot again. New CI:

https://ci.nodejs.org/job/node-test-pull-request/14286/

@BridgeAR
Copy link
Member

About not adding a test: in a way this means it could break again at any point of time. So I personally would add a test even if we do not officially support this.

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 15, 2018
@apapirovski
Copy link
Member Author

apapirovski commented Apr 15, 2018

in a way this means it could break again at any point of time.

I'm fine with that. I don't want to add a test that forces us to maintain this behaviour if it's not sensible to do so in the future. (Even if it's just as simple as making someone hesitate to make an otherwise beneficial change.) There are already some difficult guarantees around what http does that impede certain changes that would be good for it.

(The only way I know how to test this would also mean it would test a bunch of other behaviours that aren't documented and are just byproducts of how the internals are setup.)

@apapirovski
Copy link
Member Author

Landed in 95fafc0

@apapirovski apapirovski deleted the fix-http-kincomingmessage-undef branch April 17, 2018 14:11
apapirovski added a commit that referenced this pull request Apr 17, 2018
The current check for socket.server[kIncomingMessage] does not
account for the possibility of a socket.server that doesn't
have that property defined. Fix it.

PR-URL: #20029
Fixes: #19231
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
jasnell pushed a commit that referenced this pull request Apr 17, 2018
The current check for socket.server[kIncomingMessage] does not
account for the possibility of a socket.server that doesn't
have that property defined. Fix it.

PR-URL: #20029
Fixes: #19231
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
trivikr pushed a commit to trivikr/node that referenced this pull request Sep 15, 2018
The current check for socket.server[kIncomingMessage] does not
account for the possibility of a socket.server that doesn't
have that property defined. Fix it.

PR-URL: nodejs#20029
Fixes: nodejs#19231
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 31, 2018
The current check for socket.server[kIncomingMessage] does not
account for the possibility of a socket.server that doesn't
have that property defined. Fix it.

Backport-PR-URL: #22880
PR-URL: #20029
Fixes: #19231
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Nov 12, 2018
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.

kIncomingMessage undefined for socket.server
9 participants