-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
http: fix undefined error in parser event #20029
Conversation
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.
There's that |
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. |
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.) |
Landed in 95fafc0 |
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 <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Khaidi Chu <i@2333.moe>
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 <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Khaidi Chu <i@2333.moe>
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 <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Khaidi Chu <i@2333.moe>
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 <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Khaidi Chu <i@2333.moe>
The current check for
socket.server[kIncomingMessage]
does not account for the possibility of asocket.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), orvcbuild test
(Windows) passes