Skip to content

Strip entity headers on POST-to-GET redirects#607

Merged
ryanfowler merged 1 commit into
mainfrom
strip-entity-headers-on-redirects
May 26, 2026
Merged

Strip entity headers on POST-to-GET redirects#607
ryanfowler merged 1 commit into
mainfrom
strip-entity-headers-on-redirects

Conversation

@ryanfowler
Copy link
Copy Markdown
Owner

Summary

  • Track when a redirect converts a request to a bodyless GET and strip entity-specific headers on the next attempt
  • Remove Content-Type, Content-Length, and Transfer-Encoding before signing and building redirected requests
  • Preserve the same sanitization for digest retries after such redirects
  • Add regression coverage for the redirect path and the affected header set

Testing

  • cargo fmt
  • cargo clippy --locked --all-targets --all-features -- -D warnings
  • cargo test --all-features
  • Added focused unit and integration tests for POST-to-GET redirect header stripping

@ryanfowler ryanfowler enabled auto-merge May 26, 2026 23:06
@ryanfowler ryanfowler merged commit 0f28ee0 into main May 26, 2026
4 checks passed
@ryanfowler ryanfowler deleted the strip-entity-headers-on-redirects branch May 26, 2026 23:09
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