Skip to content

Commit d249b65

Browse files
pre-emptively disable sha256 payload if checksum is set (minio#5167)
1 parent b2d265d commit d249b65

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/client-s3.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,8 @@ func (c *S3Client) Put(ctx context.Context, reader io.Reader, size int64, progre
10861086
}
10871087
}
10881088

1089+
disableSha256 := putOpts.checksum.IsSet() // pre-emptively disable sha256 payload, if checksum is set.
1090+
10891091
opts := minio.PutObjectOptions{
10901092
UserMetadata: metadata,
10911093
UserTags: tagsMap,
@@ -1100,6 +1102,7 @@ func (c *S3Client) Put(ctx context.Context, reader io.Reader, size int64, progre
11001102
SendContentMd5: putOpts.md5,
11011103
Checksum: putOpts.checksum,
11021104
DisableMultipart: putOpts.disableMultipart,
1105+
DisableContentSha256: disableSha256,
11031106
PartSize: putOpts.multipartSize,
11041107
NumThreads: putOpts.multipartThreads,
11051108
ConcurrentStreamParts: putOpts.concurrentStream, // if enabled honors NumThreads for piped() uploads

0 commit comments

Comments
 (0)