Accept multipart checksums with part count (#19680)

Accept multipart uploads where the combined checksum provides the expected part count.

It seems this was added by AWS to make the API more consistent, even if the 
data is entirely superfluous on multiple levels.

Improves AWS S3 compatibility.
This commit is contained in:
Klaus Post
2024-05-08 09:18:34 -07:00
committed by GitHub
parent 8b660e18f2
commit ec49fff583
2 changed files with 37 additions and 10 deletions

View File

@@ -1231,7 +1231,7 @@ func (er erasureObjects) CompleteMultipartUpload(ctx context.Context, bucket str
}
if opts.WantChecksum != nil {
err := opts.WantChecksum.Matches(checksumCombined)
err := opts.WantChecksum.Matches(checksumCombined, len(parts))
if err != nil {
return oi, err
}