fix(s3): decode unsigned streaming checksum payloads (#3476)

This commit is contained in:
Aniket Shukla authored and GitHub committed 2026-09-12 10:11:34 -04:00
1 parent daff15da9f
commit d11fff3d6d
2 files changed
+76 -2

No files matched your search

@@ -1940,9 +1940,11 @@ public class S3Controller {
* Format: hex-size;chunk-signature=sig\r\n data \r\n ... 0;chunk-signature=sig\r\n
*/
private byte[] decodeAwsChunked(byte[] body, String contentEncoding, String contentSha256) {
boolean isAwsChunked = (contentEncoding != null && contentEncoding.contains("aws-chunked"))
boolean isAwsChunked = (contentEncoding != null
&& contentEncoding.toLowerCase(Locale.ROOT).contains("aws-chunked"))
|| "STREAMING-AWS4-HMAC-SHA256-PAYLOAD".equals(contentSha256)
|| "STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER".equals(contentSha256);
|| "STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER".equals(contentSha256)
|| "STREAMING-UNSIGNED-PAYLOAD-TRAILER".equals(contentSha256);
if (!isAwsChunked) {
return body;
}