s3store: Only disable signatures for UploadPart, if -s3-disable-content-hashes is used

This commit is contained in:
Marius 2022-07-25 13:48:08 +02:00
parent cab456900a
commit be6f50f14f
1 changed files with 6 additions and 1 deletions

View File

@ -43,7 +43,12 @@ func CreateComposer() {
if Flags.S3DisableContentHashes { if Flags.S3DisableContentHashes {
// Prevent the S3 service client from automatically // Prevent the S3 service client from automatically
// adding the Content-MD5 header to S3 Object Put and Upload API calls. // adding the Content-MD5 header to S3 Object Put and Upload API calls.
s3Config = s3Config.WithS3DisableContentMD5Validation(true) //
// Note: For now, we do not set S3DisableContentMD5Validation because when terminating an upload,
// a signature is required. If not present, S3 will complain:
// InvalidRequest: Missing required header for this request: Content-MD5 OR x-amz-checksum-*
// So for now, this flag will only cause hashes to be disabled for the UploadPart operation (see s3store.go).
//s3Config = s3Config.WithS3DisableContentMD5Validation(true)
} }
if Flags.S3DisableSSL { if Flags.S3DisableSSL {