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

decompression: propagate size_hint when body is identity #501

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

seanmonstar
Copy link
Collaborator

Motivation

When using tower_http::decompression, and no decompressing is needed, but rather the body is "identity", the size_hint gets lost. However, the identity size hint should still be valid.

Solution

This propagates the Body::size_hint call to the identity body.

@seanmonstar seanmonstar force-pushed the decompress-identity-size-hint branch from d66d5de to fb30f7c Compare August 6, 2024 14:29
@seanmonstar seanmonstar force-pushed the decompress-identity-size-hint branch from fb30f7c to 8b0cafa Compare August 6, 2024 18:33
@seanmonstar seanmonstar merged commit 5a6a4a8 into main Aug 6, 2024
11 checks passed
@seanmonstar seanmonstar deleted the decompress-identity-size-hint branch August 6, 2024 18:37
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.

2 participants