Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(host): limit body size using DefaultBodyLimit #437

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

keroro520
Copy link
Contributor

The original implementation of check_max_body_size relied on the size_hint provided by Axum. However, we've encountered instances where check_max_body_size incorrectly returns a BAD_REQUEST response due to inaccurate size_hint values.

This commit changes to use DefaultBodyLimit, which is the suggested method by axum.

See also

The original implementation of check_max_body_size relied on the size_hint
provided by Axum. However, we've encountered instances where check_max_body_size
incorrectly returns a BAD_REQUEST response due to inaccurate size_hint values.

This commit changes to use `DefaultBodyLimit`, which is the suggestion
by axum.

See also
- tokio-rs/axum#1400
- tokio-rs/axum#1397
@keroro520 keroro520 force-pushed the fix-service-content-limit branch from a45c65b to 86a7f60 Compare December 19, 2024 07:22
@smtmfft smtmfft added this pull request to the merge queue Dec 25, 2024
Merged via the queue into taikoxyz:main with commit a720df5 Dec 25, 2024
3 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants