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

ConstrainableInputStream.readToByteBuffer no longer fills buffer #1774

Closed
jhy opened this issue May 17, 2022 · 1 comment
Closed

ConstrainableInputStream.readToByteBuffer no longer fills buffer #1774

jhy opened this issue May 17, 2022 · 1 comment
Assignees
Labels
bug Confirmed bug that we should fix fixed
Milestone

Comments

@jhy
Copy link
Owner

jhy commented May 17, 2022

When using the readToByteBuffer method, such as in Connection.Response.body() if the document has not already been parsed and must be read fully, and there is any maximum buffer size being applied, only the default internal buffer size is read.

This causes the output string / bytes to be cropped to 32k.

@jhy jhy self-assigned this May 17, 2022
@jhy jhy added this to the 1.15.2 milestone May 17, 2022
@jhy jhy added the bug Confirmed bug that we should fix label May 17, 2022
@jhy jhy closed this as completed in ccbd65f May 17, 2022
@jhy
Copy link
Owner Author

jhy commented May 17, 2022

Fixed, was a regression from #1671.

@jhy jhy added the fixed label May 17, 2022
jhy added a commit that referenced this issue Aug 7, 2022
The read size of the inputstream should be the desired remaining max (if set), but no larger than the defined buffer size.

Fixes #1807

See #1774, 1671
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug that we should fix fixed
Projects
None yet
Development

No branches or pull requests

1 participant