|
|
@ -385,7 +385,6 @@ func (xl xlObjects) PutObjectPart(ctx context.Context, bucket, object, uploadID |
|
|
|
// Should return IncompleteBody{} error when reader has fewer bytes
|
|
|
|
// Should return IncompleteBody{} error when reader has fewer bytes
|
|
|
|
// than specified in request header.
|
|
|
|
// than specified in request header.
|
|
|
|
if n < data.Size() { |
|
|
|
if n < data.Size() { |
|
|
|
logger.LogIf(ctx, IncompleteBody{}) |
|
|
|
|
|
|
|
return pi, IncompleteBody{} |
|
|
|
return pi, IncompleteBody{} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -655,7 +654,6 @@ func (xl xlObjects) CompleteMultipartUpload(ctx context.Context, bucket string, |
|
|
|
PartNumber: part.PartNumber, |
|
|
|
PartNumber: part.PartNumber, |
|
|
|
GotETag: part.ETag, |
|
|
|
GotETag: part.ETag, |
|
|
|
} |
|
|
|
} |
|
|
|
logger.LogIf(ctx, invp) |
|
|
|
|
|
|
|
return oi, invp |
|
|
|
return oi, invp |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -666,17 +664,11 @@ func (xl xlObjects) CompleteMultipartUpload(ctx context.Context, bucket string, |
|
|
|
ExpETag: currentXLMeta.Parts[partIdx].ETag, |
|
|
|
ExpETag: currentXLMeta.Parts[partIdx].ETag, |
|
|
|
GotETag: part.ETag, |
|
|
|
GotETag: part.ETag, |
|
|
|
} |
|
|
|
} |
|
|
|
logger.LogIf(ctx, invp) |
|
|
|
|
|
|
|
return oi, invp |
|
|
|
return oi, invp |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// All parts except the last part has to be atleast 5MB.
|
|
|
|
// All parts except the last part has to be atleast 5MB.
|
|
|
|
if (i < len(parts)-1) && !isMinAllowedPartSize(currentXLMeta.Parts[partIdx].ActualSize) { |
|
|
|
if (i < len(parts)-1) && !isMinAllowedPartSize(currentXLMeta.Parts[partIdx].ActualSize) { |
|
|
|
logger.LogIf(ctx, PartTooSmall{ |
|
|
|
|
|
|
|
PartNumber: part.PartNumber, |
|
|
|
|
|
|
|
PartSize: currentXLMeta.Parts[partIdx].ActualSize, |
|
|
|
|
|
|
|
PartETag: part.ETag, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return oi, PartTooSmall{ |
|
|
|
return oi, PartTooSmall{ |
|
|
|
PartNumber: part.PartNumber, |
|
|
|
PartNumber: part.PartNumber, |
|
|
|
PartSize: currentXLMeta.Parts[partIdx].ActualSize, |
|
|
|
PartSize: currentXLMeta.Parts[partIdx].ActualSize, |
|
|
|