diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-12-01 17:41:42 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-01 17:41:42 -0800 |
| commit | 099a351f3b084454f0d437b2d967c0f4a3bb9e1f (patch) | |
| tree | 61428c436867a8ccc21335fdbba7c1285dc28276 /weed/s3api/object_lock_utils.go | |
| parent | 1a67e6118ef5953bfd98d29d8c0b59a53f5484ff (diff) | |
| download | seaweedfs-099a351f3b084454f0d437b2d967c0f4a3bb9e1f.tar.xz seaweedfs-099a351f3b084454f0d437b2d967c0f4a3bb9e1f.zip | |
Fix issue #6847: S3 chunked encoding includes headers in stored content (#7595)
* Fix issue #6847: S3 chunked encoding includes headers in stored content
- Add hasTrailer flag to s3ChunkedReader to track trailer presence
- Update state transition logic to properly handle trailers in unsigned streaming
- Enhance parseChunkChecksum to handle multiple trailer lines
- Skip checksum verification for unsigned streaming uploads
- Add test case for mixed format handling (unsigned headers with signed chunks)
- Remove redundant CRLF reading in trailer processing
This fixes the issue where chunk-signature and x-amz headers were appearing
in stored file content when using chunked encoding with newer AWS SDKs.
* Fix checksum validation for unsigned streaming uploads
- Always validate checksum for data integrity regardless of signing
- Correct checksum value in test case
- Addresses PR review feedback about checksum verification
* Add warning log when multiple checksum headers found in trailer
- Log a warning when multiple valid checksum headers appear in trailers
- Uses last checksum header as suggested by CodeRabbit reviewer
- Improves debugging for edge cases with multiple checksum algorithms
* Improve trailer parsing robustness in parseChunkChecksum
- Remove redundant trimTrailingWhitespace call since readChunkLine already trims
- Use bytes.TrimSpace for both key and value to handle whitespace around colon separator
- Follows HTTP header specifications for optional whitespace around separators
- Addresses Gemini Code Assist review feedback
Diffstat (limited to 'weed/s3api/object_lock_utils.go')
0 files changed, 0 insertions, 0 deletions
