Skip to content

Commit

Permalink
Ignore x-amz-te: append-md5 request header
Browse files Browse the repository at this point in the history
This header requests that the server add a trailing MD5 checksum to
the response body.  However, if the X-Amz-Transfer-Encoding:
append-md5 response header is missing then the AWS Java SDK v2 will
ignore its absence.  So ignoring the request header works for now.
Fixes #414.
  • Loading branch information
gaul committed Nov 1, 2024
1 parent aea6fd7 commit 544a863
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/gaul/s3proxy/AwsHttpHeaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ final class AwsHttpHeaders {
static final String METADATA_DIRECTIVE = "x-amz-metadata-directive";
static final String REQUEST_ID = "x-amz-request-id";
static final String STORAGE_CLASS = "x-amz-storage-class";
static final String TRANSFER_ENCODING = "x-amz-te";
static final String USER_AGENT = "x-amz-user-agent";

private AwsHttpHeaders() {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/gaul/s3proxy/S3ProxyHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public class S3ProxyHandler {
AwsHttpHeaders.DECODED_CONTENT_LENGTH,
AwsHttpHeaders.METADATA_DIRECTIVE,
AwsHttpHeaders.STORAGE_CLASS,
AwsHttpHeaders.TRANSFER_ENCODING, // TODO: ignoring header
AwsHttpHeaders.USER_AGENT
);
private static final Set<String> CANNED_ACLS = Set.of(
Expand Down

0 comments on commit 544a863

Please sign in to comment.