Skip to content

Bound HTTP/1 body reads. - #56

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
bounded-body-reads
Aug 4, 2026
Merged

Bound HTTP/1 body reads.#56
samuel-williams-shopify merged 1 commit into
mainfrom
bounded-body-reads

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Fixed-length and chunked bodies now return at most 64 KiB from each read, independently of the underlying stream implementation.

Chunked bodies retain the remaining transfer chunk length across reads, allowing upper layers to enforce total representation limits without first buffering an entire adversarial transfer chunk. Chunk terminators are now validated strictly, and truncated chunks close the read side before raising EOFError.

The declared HTTP transfer chunk size remains unrestricted because transfer chunk boundaries do not carry representation semantics.

Tests cover bounded fixed and chunked reads, invalid chunk terminators, and incremental truncation handling.

@samuel-williams-shopify
samuel-williams-shopify merged commit 38379aa into main Aug 4, 2026
36 of 40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the bounded-body-reads branch August 4, 2026 10:16
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.

1 participant