Skip to content

Fix Inflater#readpartial to honour size and never return empty string - #855

Open
sebas2day wants to merge 1 commit into
httprb:mainfrom
sebas2day:fix-inflater-readpartial-size-handling
Open

Fix Inflater#readpartial to honour size and never return empty string#855
sebas2day wants to merge 1 commit into
httprb:mainfrom
sebas2day:fix-inflater-readpartial-size-handling

Conversation

@sebas2day

Copy link
Copy Markdown

Fixes #854

Changes made:

  • Fix Inflater#readpartial to respect the size argument by buffering inflated output and returning at most size bytes
  • Ensure readpartial never returns an empty string, matching the IO#readpartial contract
  • Guard against infinite loops when the connection returns nil or ""
  • Add comprehensive test coverage for the inflater

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inflater#readpartial can return more than maxlen bytes

1 participant