fix: copyObject restore with a specific version, update test cases (#19895)

This commit is contained in:
jiuker
2024-06-10 23:50:49 +08:00
committed by GitHub
parent a2cab02554
commit 0662c90b5c
7 changed files with 157 additions and 68 deletions

View File

@@ -1580,7 +1580,7 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
// Pass the decompressed stream to such calls.
isDstCompressed := isCompressible(r.Header, dstObject) &&
length > minCompressibleSize &&
!isRemoteCopyRequired(ctx, srcBucket, dstBucket, objectAPI) && !cpSrcDstSame && !objectEncryption
!isRemoteCopyRequired(ctx, srcBucket, dstBucket, objectAPI) && !objectEncryption
if isDstCompressed {
compressMetadata = make(map[string]string, 2)
// Preserving the compression metadata.