Skip to content

fix(rust-sdk): Correct the criteria for sending request body#16342

Merged
szokeasaurusrex merged 1 commit intomasterfrom
szokeasaurusrex/sentry-rust-docs
Feb 11, 2026
Merged

fix(rust-sdk): Correct the criteria for sending request body#16342
szokeasaurusrex merged 1 commit intomasterfrom
szokeasaurusrex/sentry-rust-docs

Conversation

@szokeasaurusrex
Copy link
Member

This PR corrects the Rust Actix request-body documentation, which previously incorrectly stated that send_default_pii = false prevents request bodies from being sent. In fact, send_default_pii only restricts the captured content types, but does not fully prevent request bodies from being sent.

Explanation

send_default_pii is read in middleware via client.options().send_default_pii, stored in a local with_pii, and then passed as the with_pii parameter to should_capture_request_body. Inside that function, the parameter is used in the is_valid_content_type branch, where send_default_pii = false restricts body capture to exact application/json and application/x-www-form-urlencoded, while send_default_pii = true allows any content type.

should_capture_request_body also checks transfer encoding, Content-Length, and max_request_body_size; SentryMiddleware::call then checks should_capture_request_body's return value to determine whether to capture the request body. So send_default_pii affects content-type eligibility, but is not a hard on/off switch for request body capture.

@vercel
Copy link

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Feb 10, 2026 6:12pm
sentry-docs Ready Ready Preview, Comment Feb 10, 2026 6:12pm

Request Review

@codeowner-assignment codeowner-assignment bot requested a review from a team February 10, 2026 17:29
@szokeasaurusrex szokeasaurusrex changed the title fix(cli): Correct the criteria for sending request body fix(rust-sdk): Correct the criteria for sending request body Feb 10, 2026
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/sentry-rust-docs branch from 91fcd8f to 35de74d Compare February 10, 2026 17:30
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/sentry-rust-docs branch from 35de74d to aefc6c7 Compare February 10, 2026 18:01
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/sentry-rust-docs branch from aefc6c7 to 7a56003 Compare February 10, 2026 18:02
@szokeasaurusrex szokeasaurusrex merged commit da4f80a into master Feb 11, 2026
13 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/sentry-rust-docs branch February 11, 2026 13:10
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