Skip to content

Conversation

@ZzIsGod1019
Copy link

@ZzIsGod1019 ZzIsGod1019 commented Oct 23, 2025

Hello,

I recently upgraded the project from version 0.35 to 0.37, and after the upgrade I encountered a SignatureDoesNotMatch error when calling put_bucket_lifecycle.

Following the suggestions provided by Cursor, I modified the source code to address this issue. After applying the changes, the request now works as expected.

However, since I’m not very familiar with the signature logic, I’m not entirely sure whether my modification is the correct or recommended approach.

I would appreciate it if a maintainer could kindly review my changes and confirm whether it’s appropriate to merge this commit.

Thank you very much for your time and assistance.


This change is Reviewable

Summary by CodeRabbit

  • Bug Fixes
    • Fixed S3 request header handling to properly maintain required headers during bucket lifecycle operations instead of incorrectly removing them.

fix: command PutBucketLifecycle failed(SignatureDoesNotMatch)
@coderabbitai
Copy link

coderabbitai bot commented Oct 23, 2025

Walkthrough

The x-amz-content-sha256 header is no longer removed in the PutBucketLifecycle request path after computing and inserting the content-md5 header. This allows the header to persist through that specific code branch.

Changes

Cohort / File(s) Summary
Header removal elimination
s3/src/request/request_trait.rs
Removed the deletion of x-amz-content-sha256 header in the PutBucketLifecycle branch, allowing the header to remain in the request after content-md5 computation

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A header stays when it should be,
No more vanishing from the tree,
x-amz-content-sha256 now lives long,
In PutBucketLifecycle's song!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "Fix for SignatureDoesNotMatch Error in put_bucket_lifecycle" is directly related to the changeset. The file-level summary indicates that the change modifies header handling in the PutBucketLifecycle request path to address signature validation issues, which aligns with the title's description of fixing a SignatureDoesNotMatch error. The title is concise, specific to both the error type and the affected function, and clearly communicates the main purpose of the change from a developer's perspective. It avoids vague or generic language and accurately represents the problem being addressed.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d88c5f4 and a5b3420.

📒 Files selected for processing (1)
  • s3/src/request/request_trait.rs (0 hunks)
💤 Files with no reviewable changes (1)
  • s3/src/request/request_trait.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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