fix(s3): omit empty x-amz-tagging header for B2 compatibility#44
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
x-amz-taggingwhen client supplied no tagsFixes #34.
Root cause
s3proxy/internal/s3/s3.goalways assignedTagging: &tagsonPutObjectInput, even whentags == "". The AWS SDK then emitsx-amz-tagging:on the wire. AWS S3 tolerates this; B2 rejects withInvalidArgument: Unsupported header 'x-amz-tagging' received for this API call.Change
Guard the assignment behind
if tags != "", matching the existing pattern used forSSECustomerAlgorithm,SSECustomerKey, etc.Test plan
golangci-lint run ./...— cleango test ./...— 82 passed in 7 packagesx-amz-tagging🤖 Generated with Claude Code