When retrieving gzip-encoded objects from S3Proxy using the AWS SDK for Java 2.40.6 (and possibly older), the GET Object request fails with:
501 NotImplemented
A header you provided implies functionality that is not implemented.
...
ERROR org.gaul.s3proxy.S3ProxyHandler --
Unknown header x-amz-checksum-crc32 with URI /test-bucket/hello/hello.txt
This occurs even though the object was successfully uploaded and stored with S3Proxy, the failure only appears during retrieval.
From what I can tell recent versions of the AWS SDK for Java automatically include x-amz-checksum-* headers on some requests, including GET Object.
Minimal reproduction
https://github.com/thomasturrell/s3proxy-local-file-store-minimal
Workaround
The issue can be worked around by explicitly configuring the S3 client:
.requestChecksumCalculation(RequestChecksumCalculation.WHEN_REQUIRED)
.responseChecksumValidation(ResponseChecksumValidation.WHEN_REQUIRED)
However, this requires non-obvious configuration and is easy for users to miss.
Environment
- S3Proxy 2.9.0
- AWS SDK for Java: 2.40.6
- Java: 21
- OS: Linux (GitHub Codespaces)