Skip to content

Honor Sentry request body capture limits - #410

Merged
lesnik512 merged 2 commits into
mainfrom
fix/391-sentry-body-limit
Nov 3, 2026
Merged

lesnik512 merged 2 commits into
mainfrom
fix/391-sentry-body-limit

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Closes #391.

Starlette skips recording request bodies rejected by the Sentry size policy and drops buffered chunks when the actual stream crosses the limit. The full stream still reaches the application.

Litestar checks the declared length and the cached raw body size when available. Parsed forms without cached raw bytes use the declared length.

Five regression cases failed before the fix. All 612 tests, lint, and type checking passed locally.

@lesnik512
lesnik512 merged commit 8631a8b into main Nov 3, 2026
1 check passed
@lesnik512
lesnik512 deleted the fix/391-sentry-body-limit branch November 3, 2026 04:49
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.

Honour max_request_body_size in the lean Starlette Sentry middleware

1 participant