Closed aajtodd closed 2 months ago
Same problem here (with a working solution): https://github.com/awslabs/aws-sdk-rust/issues/1103#issuecomment-2008959603
In short: A workaround is not specifying the algorithm. So a working code would be:
s3.put_object()
.bucket(bucket_name)
.key(key_name)
.checksum_sha256("bad-sha")
.body(body)
.send()
.await?;
closing as duplicate of #1103
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
When a user supplies both
checksum_algorithm
and a pre-calculated checksum the SDK will go ahead and calculate one anyway and overwrite the user supplied one.Expected Behavior
The SDK should detect this and use the user supplied value and do nothing. This is the behavior described in the SEP.
Current Behavior
The user supplied checksum is serialized to a header and then is later overwritten with the value it calculates.
Reproduction Steps
See bug description. Sending a bad value for the checksum should fail but it doesn't because we overwrite it.
Possible Solution
No response
Additional Information/Context
No response
Version
Environment details (OS name and version, etc.)
macOS 14.4
Logs
No response