expressjs / expressjs/express

node http code change could have major effect on express

Open
#3,555 11 comments 0 reactions 0 assignees View on GitHub
6.x discuss
Dominant language
JavaScript
Stars
69.5k
Forks
25k
Avg merge
4d 20h
Merged PRs (30d)
9

Description

In node, commit nodejs/node@a899576c that landed yesterday can have major problems for express if someone does use the IncomingMessage option.

On line 31 of request https://github.com/expressjs/express/blob/master/lib/request.js#L31 express references http.IncomingMessage.prototype to extend it with all the express functionality.

If someone changes the http IncomingMessage class and doesn't extend IncomingMessage then the reqs will not have any of express functions.

Not sure why someone would, but they have the option to replicate the whole class without having to extend the real one.

I haven't tested this yet (I will need to learn how to build node).. but I wanted to give everyone the heads up.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.