http: remove usage of internal stream state from _http_server#34888
http: remove usage of internal stream state from _http_server#34888lundibundi wants to merge 2 commits intonodejs:masterfrom
Conversation
Looks like they have been accidentally moved in nodejs#31144. This also adds the proxy properties to Readable since they have been present all this time and removing them would be breaking.
|
Review requested:
|
| // .resume() or .on('data'), then we call req._dump() so that the | ||
| // bytes will be pulled off the wire. | ||
| if (!req._consuming && !req._readableState.resumeScheduled) | ||
| if (!req._consuming && req.paused) |
There was a problem hiding this comment.
Ok, I tried to use .isPaused() but it looks like the state[kPaused] === true instead of state[kPaused] !== false breaks it. = (
There was a problem hiding this comment.
I'm not sure what exactly is the correct way/property here... I would probably leave this as is :/
There was a problem hiding this comment.
Yeah, it doesn't look like it will be easy to change.
The same goes for _http_incoming which uses readingMore = true to basically pause the stream without actually pausing it.
There was a problem hiding this comment.
@ronag Just looked at http2 and quic, looks like that is present there as well. Could we think of some sort of public API for that? (I mean readingMore = true etc)
There was a problem hiding this comment.
Not sure at the moment why we are doing this but if quic is doing it then it’s probable I will look into it at some point.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesDepends on #34886
Refs: #445
/cc @nodejs/http @ronag