-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 _dump regression #20088
http: fix _dump regression #20088
Conversation
This should probably be in 10.x to avoid a regression in |
What would this fix? Is there a bug to track that? What is the regression? Side note, before this there was zero test coverage of _dump behavior. And a test to see _dump called as been added. |
Any situation that's not covered by the current I'm still fixing one failure on the CI. Should have a fix shortly. |
91cd8f8
to
83a0fee
Compare
CI: https://ci.nodejs.org/job/node-test-pull-request/14342/ Had to add back the manipulation of the |
83a0fee
to
8a9ef4f
Compare
A recent set of changes removed _consuming tracking from server incoming messages which ensures that _dump only runs if the user has never attempted to read the incoming data. Fix by reintroducing _consuming which tracks whether _read was ever sucessfully called.
8a9ef4f
to
32d6472
Compare
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.
I think we should document this somewhere.
LGTM on code (we’ll need to remove those _readableState access later on).
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.
Good job.
Landed in 3d480dc |
A recent set of changes removed _consuming tracking from server incoming messages which ensures that _dump only runs if the user has never attempted to read the incoming data. Fix by reintroducing _consuming which tracks whether _read was ever successfully called. PR-URL: #20088 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
@jasnell if you can pull this in into 10.0.0 that would be ideal. That way we can avoid a potential regression in |
A recent set of changes removed _consuming tracking from server incoming messages which ensures that _dump only runs if the user has never attempted to read the incoming data. Fix by reintroducing _consuming which tracks whether _read was ever successfully called. PR-URL: #20088 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Backported the test part for v8.x in #21595 |
A recent set of changes removed
_consuming
tracking from server incoming messages which ensures thatIncomingMessage#_dump
only runs if the user has never attempted to read the incoming data. Fix by reintroducing_consuming
which tracks whetherIncomingMessage#_read
was ever successfully called.Long-term it would be nice if it was possible to reply with status code 413 to a request with a long payload (without actually handling all of that payload) and not have the http client throw
write EPIPE
error while not receiving any of that response.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes