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

0.14 backport chunked fixes #3496

Merged
merged 2 commits into from
Dec 18, 2023
Merged

0.14 backport chunked fixes #3496

merged 2 commits into from
Dec 18, 2023

Conversation

seanmonstar
Copy link
Member

Backports #3494 and #3495

Previously, hyper would decode `\r\n\r\n` as `0\r\n\r\n`. This fixes
hyper to require a digit to be present before starting at 0.

Reported-by: Ben Kallus <benjamin.p.kallus.gr@dartmouth.edu>
The chunked transfer-encoding allows for extensions within the header of
each chunk. hyper currently ignores the extension bytes. Sending large
amounts of bytes in the extensions will waste CPU reaing and skipping
them.

This change adds an internal limit to how many bytes will be read and
ignored in a single body, before returning an error.

Reported-by: Bartek Nowotarski <bartek@nowotarski.info>
@seanmonstar seanmonstar merged commit 344a878 into 0.14.x Dec 18, 2023
19 checks passed
@seanmonstar seanmonstar deleted the 0.14-backport-chunked-fixes branch December 18, 2023 14:00
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