-
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: do not replace .read() in IncomingMessage #18939
http: do not replace .read() in IncomingMessage #18939
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_consuming
is used in _http_server.js
as well, I guess you could change that now that it has become a constant?
Very interestling, this test is failing on some machines: not ok 702 parallel/test-http-connectduration_ms: 0.631
|
Seems it’s a flaky test #18940. I’ll rebased and rerun later today. |
After looking at this more carefully, I'm in favor of removing it. It will run through CITGM, right? |
f1452f8
to
a5e23ab
Compare
I've tracked down where I will add a test for it and come up with an alternative fix that maintain the functionality. |
An alternative approach is to remove the logic completely. |
It is of course difficult to tell if To me it feels like we should just make this a semver-major to be on the safe side. If others feel different, please just comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice finding.
a5e23ab
to
1bbac5d
Compare
CI: https://ci.nodejs.org/job/node-test-pull-request/13371/ Confirmed, that block of code is superseded and it can be removed safely. |
@mcollina Yes, this still LGTM |
Remove the req._consumed property, as its use is completely superseded and not needed anymore. This was being set in the overridden .read(). PR-URL: #18939 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed as 29be1e5. |
Remove the req._consumed property, as its use is completely superseded and not needed anymore. This was being set in the overridden .read(). PR-URL: nodejs#18939 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This removes some monkeypatching in
IncomingMessage.prototype.read()
that I did not understand. Surprisingly, none of our tests fails if I remove them.I'm opening this PR mainly to gather understanding of what these lines of code do, and if we really need those.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
http