Skip to content
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

respect size in _read for toReadableStream #13

Merged
merged 2 commits into from May 20, 2014

Conversation

nlf
Copy link
Member

@nlf nlf commented Apr 23, 2014

When using toReadableStream on very large payloads, the old version of _read was sending all available data. This pull request makes the stream respect the size parameter to prevent from overloading a receiving stream.

Big thanks to @michelle-becker for finding this issue

@hueniverse
Copy link
Contributor

This doesn't test the change, just keeps coverage.

@nlf
Copy link
Member Author

nlf commented Apr 28, 2014

You're right, I can add a test that consumes a stream and verifies it gets the right number of bytes in each read.

@nlf
Copy link
Member Author

nlf commented Apr 28, 2014

How's that?

@hueniverse hueniverse added this to the 2.6.0 milestone May 20, 2014
@hueniverse hueniverse self-assigned this May 20, 2014
hueniverse pushed a commit that referenced this pull request May 20, 2014
respect size in _read for toReadableStream
@hueniverse hueniverse merged commit 69ef89f into hapijs:master May 20, 2014
@nlf nlf deleted the chunkStream branch May 20, 2014 21:58
hueniverse pushed a commit that referenced this pull request May 20, 2014
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants