mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
Enforce md5sum checks for object retention APIs (#9030)
this PR enforces md5sum verification for following API's to be compatible with AWS S3 spec - PutObjectRetention - PutObjectLegalHold Co-authored-by: Harshavardhana <harsha@minio.io>
This commit is contained in:
@@ -127,6 +127,12 @@ func checkValidMD5(h http.Header) ([]byte, error) {
|
||||
return []byte{}, nil
|
||||
}
|
||||
|
||||
// hasContentMD5 returns true if Content-MD5 header is set.
|
||||
func hasContentMD5(h http.Header) bool {
|
||||
_, ok := h[xhttp.ContentMD5]
|
||||
return ok
|
||||
}
|
||||
|
||||
/// http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadingObjects.html
|
||||
const (
|
||||
// Maximum object size per PUT request is 5TB.
|
||||
|
||||
Reference in New Issue
Block a user