add option to disable integrity check for multipart upload #3007
Labels
feature/s3/manager
Pertains to S3 transfer manager HLL (feature/s3/manager).
feature-request
A feature should be added or improved.
p3
This is a minor priority issue
queued
This issues is on the AWS team's backlog
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
I read the announcement about the integrity check behaviour change, and tried to disable the integrity check by setting
request_checksum_calculation
andresponse_checksum_validation
towhen_required
.However, it seems that the integrity check cannot be disabled for multipart upload by
Uploader.Upload
function infeature/s3/manager
package. I checked the HTTP header of the SDK's requests usingtcpdump
command. The results were as follows:feature/s3/manager
v1.17.57 (depending onservice/s3 v1.76.0
) without options:feature/s3/manager
v1.17.57 (depending onservice/s3 v1.76.0
) with options:X-Amz-Checksum-Crc32
andX-Amz-Sdk-Checksum-Algorithm
headers still exist.feature/s3/manager
v1.17.45 (depending onservice/s3 v1.72.0
):Regression Issue
Expected Behavior
The integrity check can be disabled for multipart upload by
Uploader.Upload()
by setting bothrequest_checksum_calculation
andresponse_checksum_validation
towhen_required
.Current Behavior
The integrity check cannot be disabled for multipart upload by
Uploader.Upload()
even if bothrequest_checksum_calculation
andresponse_checksum_validation
are set towhen_required
.Reproduction Steps
I created a client as follows.
Then called
uploader.Upload()
.Possible Solution
Although I'm not entirely sure, it seems that the
X-Amz-Sdk-Checksum-Algorithm
header is set regardless of the options forUploadPart()
which is internally called byUploader.Upload()
.aws-sdk-go-v2/feature/s3/manager/upload.go
Line 736 in e40a4a1
Additional Information/Context
Uploader.Upload
worked fine with small enough objects which resulted in the single-part upload (=PutObject
).feature/s3/manager v1.17.57 (depending on service/s3 v1.76.0) with options (small object):
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.57
github.com/aws/aws-sdk-go-v2/service/s3 v1.76.0
Compiler and Version used
go version go1.23.2 linux/amd64
Operating System and version
Ubuntu 22.04.5 LTS
The text was updated successfully, but these errors were encountered: