canonicalize ETag correctly (#7442)

Fixes #7441 
Trim extra quotes prefixing/suffixing ETag in
CompleteMultipartUpload request.
This commit is contained in:
poornas
2019-04-01 12:19:52 -07:00
committed by kannappanr
parent 619611933a
commit 023866642c
6 changed files with 69 additions and 5 deletions

View File

@@ -675,6 +675,8 @@ func (xl xlObjects) CompleteMultipartUpload(ctx context.Context, bucket string,
// Validate each part and then commit to disk.
for i, part := range parts {
// ensure that part ETag is canonicalized to strip off extraneous quotes
part.ETag = canonicalizeETag(part.ETag)
partIdx := objectPartIndex(currentXLMeta.Parts, part.PartNumber)
// All parts should have same part number.
if partIdx == -1 {