Open
Conversation
3c1132c to
28b60b8
Compare
ixti
requested changes
Sep 22, 2020
spec/lib/http/connection_spec.rb
Outdated
Comment on lines
70
to
105
| buffer << outbuf while connection.readpartial(3, outbuf) | ||
| expect(buffer).to eq "1234567890" |
Member
There was a problem hiding this comment.
Due to the problem above, if you will change size to 1 or 2 you will get corrupted data: 1224447790 or 12345457890 respectively.
Member
|
@singpolyma-shopify thank you for the PR. I really like the proposed changes, but we need to make sure they work as expected when parser's buffer contains more data than requested size :D |
28b60b8 to
8d362d7
Compare
Author
|
@ixti fixed |
IO#readpartial allows for a second "outbuf" param which some streaming usages expect, so support it here to allow using response bodies anywhere IO can be.
Closed
8d362d7 to
07c1f39
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IO#readpartial allows for a second "outbuf" param which some streaming usages
expect, so support it here to allow using response bodies anywhere IO can be.