GeezerVison is showing github.com — _http_common ParserIncomingMessage fails to check for undefined on parser.socket.server[kIncomingMessage] · Issue #20151 · nodejs/node
_http_common ParserIncomingMessage fails to check for undefined on parser.socket.server[kIncomingMessage] #20151
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.httpIssues and PRs related to the http subsystem. Description
|
var ParserIncomingMessage = parser.socket && parser.socket.server ? |
|
parser.socket.server[kIncomingMessage] : IncomingMessage; |
|
|
|
parser.incoming = new ParserIncomingMessage(parser.socket); |
|
parser.incoming.httpVersionMajor = versionMajor; |
Due to this line of code, if parser.socket.server[kIncomingMessage] is undefined, an error will be thrown on the line below where the ParserIncomingMessage is constructed. A simple additional check here would solve this issue. A few libraries have cropped this up in socket.io, ws and some others that weren't happening in previous versions of node.
Node version: 9.6.0
Platform: OSX
Activity
apapirovski commented on Apr 19, 2018
This will be in the 10.0.0 release. See #20029 for a fix.
Duplicate of #19231
Metadata
Metadata
duplicateIssues and PRs that are duplicates of other issues or PRs.httpIssues and PRs related to the http subsystem. Development
No branches or pull requestsIssue actions