Merge remote-tracking branch 'origin/main' into codex/reject-unsupported-checksums

This commit is contained in:
Feng Ruohang
2026-08-29 19:14:51 +08:00
22 changed files with 1208 additions and 49 deletions
+7 -1
View File
@@ -472,11 +472,17 @@ func completeMultipartOpts(ctx context.Context, r *http.Request, bucket, object
}
}
opts.wantChecksumType = r.Header.Get(xhttp.AmzChecksumType)
switch opts.wantChecksumType {
case "", xhttp.AmzChecksumTypeComposite, xhttp.AmzChecksumTypeFullObject:
default:
return opts, hash.ErrInvalidChecksum
}
opts.WantChecksum, err = hash.GetContentChecksum(r.Header)
if err != nil {
return opts, err
}
opts.wantChecksumTypeSet = r.Header.Get(xhttp.AmzChecksumType) != ""
opts.MTime = mtime
opts.UserDefined = make(map[string]string)
// Transfer SSEC key in opts.EncryptFn