-
Notifications
You must be signed in to change notification settings - Fork 910
S3 object Content Encoding Metadata not being set on upload #3750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
this was previously reported here #3569 but we already released a fix in Can you double check if you are really using |
@debora-ito I just verified this. Our latest build is using 2.19.31. I reproduced the problem just now. |
I can't reproduce using your sample code, I see the content-encoding after the upload - Can you enable the CRT Debug logs? I'm just looking for the canonical request, to see if it includes the headers.
|
@debora-ito I attached a TransferListener to the upload request and here's the output from that just to verify that the content encoding is present there.
And here's the request data from the CRT trace data
Small note, I added code to set the checksum just incase that might cause the correct encoding to get set, based on the issue you linked to above. That's why you see the SHA-256 checksum header. |
Swapping back to the non-CRT S3 client is a workaround to this problem. |
Thank you for the logs, I can repro now. The issue occurs when the upload is not a multipart upload, it's a single part upload. |
any news? it causing us issues on production |
@debora-ito Is there any news on fixing this? |
a fix was released in |
Fix released in Java SDK version |
|
…b96fd2a34 Pull request: release <- staging/9bf4b3c8-4200-45cf-9f0a-4c4b96fd2a34
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I'm uploading a GZIP encoded JSON file to S3 using the S3 CRT client and the TransferManager. When I upload the file, the
Content-Encoding
metadata is not getting set on the object in S3. When the file is downloaded in a browser with a pre-signed URL it isn't being uncompressed because the response to the HTTP request to the pre-signed URL has an emptyContent-Encoding
header.Here's the code to upload the file
Where
CONTENT_ENCODING
is a final String with a value "gzip".contentType
is "application/json". And the source is a temporary file which contains the GZIP encoded data.Building the client is pretty vanilla
This had been working correctly until we switched to using the CRT client from the non-CRT client just yesterday.
Expected Behavior
The content encoding is set correctly based off the value provided via the API.
Current Behavior
Content encoding is set to an empty value.

Reproduction Steps
Upload a file with the code provided above.
Possible Solution
No response
Additional Information/Context
CRT version: 0.21.5
AWS Java SDK version used
2.19.31
JDK version used
11
Operating System and version
Ubuntu 22.10 (Docker image)
The text was updated successfully, but these errors were encountered: