Skip to content

fix(s3): omit empty x-amz-tagging header for B2 compatibility#44

Merged
ynsta merged 1 commit into
mainfrom
fix/b2-tagging-empty
May 20, 2026
Merged

fix(s3): omit empty x-amz-tagging header for B2 compatibility#44
ynsta merged 1 commit into
mainfrom
fix/b2-tagging-empty

Conversation

@ynsta

@ynsta ynsta commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stop sending x-amz-tagging when client supplied no tags
  • Unblocks Backblaze B2 (and other non-AWS backends) that reject the empty header

Fixes #34.

Root cause

s3proxy/internal/s3/s3.go always assigned Tagging: &tags on PutObjectInput, even when tags == "". The AWS SDK then emits x-amz-tagging: on the wire. AWS S3 tolerates this; B2 rejects with InvalidArgument: Unsupported header 'x-amz-tagging' received for this API call.

Change

Guard the assignment behind if tags != "", matching the existing pattern used for SSECustomerAlgorithm, SSECustomerKey, etc.

Test plan

🤖 Generated with Claude Code

PutObject unconditionally set Tagging on the SDK input, causing the
AWS SDK to emit an empty x-amz-tagging header. Backblaze B2 (and
other non-AWS S3-compatible backends) reject any presence of the
header, breaking PUTs through the proxy.

Only forward Tagging when the client supplied a non-empty value.

Closes #34

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ynsta ynsta merged commit 0cbbacd into main May 20, 2026
5 checks passed
@ynsta ynsta deleted the fix/b2-tagging-empty branch May 20, 2026 07:20
ynsta added a commit that referenced this pull request May 20, 2026
Patch release rolling up the B2 compatibility fix landed since v1.8.0:

- fix(s3): omit empty x-amz-tagging header for B2 compatibility (#34, #44)
- ci(helm): honor Chart.yaml version, add chart-v* trigger

Chart version bumped to 1.8.2 to match the new appVersion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

B2 Unsupported header 'x-amz-tagging' received for this API call.

1 participant