S3 PutObject with ChecksumAlgorithm Sets Empty Content-Encoding Header #3568
Labels
bug
This issue is a confirmed bug.
closing-soon
This issue will automatically close in 4 days unless further comments are made.
p2
This is a standard priority issue
s3
Describe the bug
When calling the method
put_object
in the S3 client, if the request has a ChecksumAlgorithm specified, the ContentEncoding argument gets overwritten and set to an empty string.Expected Behavior
I expect my manually-set ContentEncoding argument to be preserved.
Current Behavior
Currently the ContentEncoding gets overwritten and set to an empty string.
Reproduction Steps
produces as output:
{'ResponseMetadata': {'RequestId': '...', 'HostId': '...', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amz-id-2': '...', 'x-amz-request-id': '...', 'date': 'Thu, 26 Jan 2023 09:25:14 GMT', 'last-modified': 'Thu, 26 Jan 2023 09:25:13 GMT', 'etag': '"..."', 'x-amz-checksum-sha1': '/CTXfXUwTM/KvoFXC7OEpF7/dIA=', 'x-amz-server-side-encryption': 'AES256', 'content-encoding': '', 'accept-ranges': 'bytes', 'content-type': 'binary/octet-stream', 'server': 'AmazonS3', 'content-length': '25'}, 'RetryAttempts': 0}, 'AcceptRanges': 'bytes', 'LastModified': datetime.datetime(2023, 1, 26, 9, 25, 13, tzinfo=tzutc()), 'ContentLength': 25, 'ChecksumSHA1': '/CTXfXUwTM/KvoFXC7OEpF7/dIA=', 'ETag': '"75e79ae360a5e94d1c74a7ce1c80599c"', 'ContentEncoding': '', 'ContentType': 'binary/octet-stream', 'ServerSideEncryption': 'AES256', 'Metadata': {}}
Possible Solution
The same issue is being discussed in the Java SDK:
Additional Information/Context
No response
SDK version used
1.26.57
Environment details (OS name and version, etc.)
Linux - Ubuntu
The text was updated successfully, but these errors were encountered: