fix: CopyObject with REPLACE directive deletes existing tags (#9478)

Fixes #9477
master
P R 5 years ago committed by GitHub
parent ab77b216d1
commit 5dd9cf4398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      cmd/object-handlers.go

@ -656,9 +656,9 @@ func getCpObjTagsFromHeader(ctx context.Context, r *http.Request, tags string) (
if tags := r.Header.Get(xhttp.AmzObjectTagging); tags != "" {
return extractTags(ctx, tags)
}
// Copy is default behavior if x-amz-tagging-directive is set, but x-amz-tagging is
// is not set
return tags, nil
// If x-amz-tagging-directive is explicitly set to replace and x-amz-tagging is not set.
// The S3 behavior is to unset the tags.
return "", nil
}
// Copy is default behavior if x-amz-tagging-directive is not set.

Loading…
Cancel
Save