Skip to content

fix: use original accept encoding header to resolve s3 request signing issue #729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

itslenny
Copy link
Contributor

@itslenny itslenny commented Jul 15, 2025

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

S3 calls that include an accept-encoding header fail to be verified because Cloudflare modifies this header. This impacts those using the Go SDK V2 (and potentially others)

What is the new behavior?

Replace the (cloudflare modified) accept-encoding header with the value of x-original-accept-encoding so the request can be verified successfully.

Additional context

@coveralls
Copy link

coveralls commented Jul 15, 2025

Pull Request Test Coverage Report for Build 16301044024

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 4 of 9 (44.44%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 76.924%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/storage/protocols/s3/signature-v4.ts 4 9 44.44%
Files with Coverage Reduction New Missed Lines %
src/internal/database/tenant.ts 2 83.25%
Totals Coverage Status
Change from base Build 16264541738: -0.03%
Covered Lines: 20440
Relevant Lines: 26341

💛 - Coveralls

@itslenny itslenny merged commit 4b8aa66 into master Jul 21, 2025
2 of 3 checks passed
@itslenny itslenny deleted the fix/use-original-encoding-header-if-available branch July 21, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants