-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
d1bc5b0 introduced a way to disable checksum validation. The current API documentation still mentions this and there are a few tests for this.
The original commit made sure that checksum_mode was only passed along when it was not DISABLED. This, I believe, is the correct behavior, because the only allowed value for the x-amz-checksum-mode header, according to https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html is ENABLED.
This code was removed in df86be6 without any reason given. And indeed now when you set checksum_mode to DISABLED this gets passed down and results in an x-amz-checksum-mode header with the invalid value DISABLED.
This breaks download from S3-compatible service that reject invalid headers.
It would be amazing if the previous behavior could be reinstated in some way.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
No header of the form
x-amz-checksum-mode: DISABLEDshould be emitted.
Current Behavior
A header of the form
x-amz-checksum-mode: DISABLEDis being emitted.
Reproduction Steps
Download a file with Aws::S3::Object#download_file (or using Aws::S3::FileDownloader#download directly) and pass the option checksum_mode: 'DISABLED'.
Possible Solution
No response
Additional Information/Context
No response
Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version
aws-sdk-s3
Environment details (Version of Ruby, OS environment)
ruby-3.4.7
aws-sdk-core (3.236.0)
aws-sdk-s3 (1.203.0)