Skip to content

test(s3): cover custom XML request headers#206

Merged
overtrue merged 1 commit into
mainfrom
test/xml-custom-headers
May 17, 2026
Merged

test(s3): cover custom XML request headers#206
overtrue merged 1 commit into
mainfrom
test/xml-custom-headers

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

Related issue(s)

None.

Background

Recent custom request header support covered AWS SDK requests and presigned URL behavior, but the manually signed XML request path used by bucket replication and related operations did not have direct regression coverage.

Solution

Add a focused S3 client unit test with a local HTTP capture server. The test verifies that custom x-amz headers are sent on XML requests and included in the Authorization signed header list.

Test status

  • cargo test -p rc-s3 custom_headers_are_added_to_xml_requests_before_signing --lib
  • cargo fmt --all --check
  • git diff --check
  • make pre-commit

@overtrue overtrue marked this pull request as ready for review May 16, 2026 21:11
Copilot AI review requested due to automatic review settings May 16, 2026 21:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds regression coverage in the S3 client unit tests to ensure user-provided custom x-amz-* request headers are applied to the manually-signed XML request path (used by replication/bucket ops) and included in the SigV4 signed header list.

Changes:

  • Added a small local TCP capture server to record raw XML HTTP requests (method/target/headers).
  • Added a unit test asserting custom headers are present on XML requests and appear in the Authorization signed headers list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/s3/src/client.rs Outdated
Comment thread crates/s3/src/client.rs
@overtrue overtrue force-pushed the test/xml-custom-headers branch from c705e99 to 5ded438 Compare May 16, 2026 21:19
@overtrue overtrue merged commit 45d43b9 into main May 17, 2026
15 checks passed
@overtrue overtrue deleted the test/xml-custom-headers branch May 17, 2026 01:41
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