#778·Nginx

在使用 nginx 作为 https 代理时出现 AWS-chunked 编码问题

作者: philippebi创建于 2025年7月9日更新于 2026年9月30日
标签bugneed more info

> AWS s3api put-object --bucket my_bucket --key toto.txt --body toto.txt --endpoint-url https://toto.example.com --ca-bundle toto.example.com.crt An error occurred (MalformedTrailerError) when calling the PutObject operation: The request contained trailing data that was not well-formed or did not conform to our published schema. With the debug flag enabled, we can observe that AWS-chunked is being used as Content-Encoding along with x-amz-content-sha256:STREAMING-UNSIGNED-PAYLOAD-TRAILER, which does not appear to be fully supported by NGINX. 2025-07-09 20:58:51,863 - MainThread - botocore.auth - DEBUG - CanonicalRequest: PUT /my_bucket/toto.txt content-encoding:AWS-chunked host:toto.example.com x-amz-content-sha256:STREAMING-UNSIGNED-PAYLOAD-TRAILER x-amz-date:20250709T185851Z x-amz-decoded-content-length:8 x-amz-sdk-checksum-algorithm:CRC64NVME x-amz-security-token: long_token x-amz-trailer:x-amz-checksum-crc64nvme content-encoding;host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-sdk-checksum-algorithm;x-amz-security-token;x-amz-trailer STREAMING-UNSIGNED-PAYLOAD-TRAILER Two workarounds to