-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
stream: don't read more than can handle in webstream #46846
Conversation
} | ||
|
||
let chunk; | ||
while ((chunk = streamReadable.read(controller.desiredSize)) !== null) { |
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.
Need to make sure controller.desiredSize
must be less than 1GB as the docs specify
[...] The size argument must be less than or equal to 1 GiB. [...]
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.
Should I don't specify size
argument here, in case the desiredSize
is really big?
I think the current behavior in the failing test should be the expected one, why would we need 2 reads? the failed test is: node/test/parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js Lines 174 to 209 in b164038
|
ping @mcollina |
In don't know. I would need to dig deep into this and currently do not have time. Maybe @jasnell has some ideas. |
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.
lgtm
This is correct but it needs a test
It looks like this still needs a test. |
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
Closing this because it has stalled. Feel free to reopen if this issue/PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. |
fix #46347
TODO
Cc @mcollina