mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
fix: CopyObject with REPLACE directive deletes existing tags (#9478)
Fixes #9477
This commit is contained in:
@@ -656,9 +656,9 @@ func getCpObjTagsFromHeader(ctx context.Context, r *http.Request, tags string) (
|
|||||||
if tags := r.Header.Get(xhttp.AmzObjectTagging); tags != "" {
|
if tags := r.Header.Get(xhttp.AmzObjectTagging); tags != "" {
|
||||||
return extractTags(ctx, tags)
|
return extractTags(ctx, tags)
|
||||||
}
|
}
|
||||||
// Copy is default behavior if x-amz-tagging-directive is set, but x-amz-tagging is
|
// If x-amz-tagging-directive is explicitly set to replace and x-amz-tagging is not set.
|
||||||
// is not set
|
// The S3 behavior is to unset the tags.
|
||||||
return tags, nil
|
return "", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy is default behavior if x-amz-tagging-directive is not set.
|
// Copy is default behavior if x-amz-tagging-directive is not set.
|
||||||
|
|||||||
Reference in New Issue
Block a user