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
Merged

Conversation

@nlf
Copy link
Member

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

This comment has been minimized.

Copy link
Member

hueniverse commented Apr 28, 2014

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

@nlf

This comment has been minimized.

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

This comment has been minimized.

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 added 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
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@nlf nlf deleted the nlf:chunkStream branch May 20, 2014
@hueniverse hueniverse added bug and removed enhancement labels May 20, 2014
hueniverse added a commit that referenced this pull request May 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.