Skip to content

fix: s3 stream pipeline ordering#906

Merged
ferhatelmas merged 1 commit intomasterfrom
ferhat/aws-chunked
Mar 12, 2026
Merged

fix: s3 stream pipeline ordering#906
ferhatelmas merged 1 commit intomasterfrom
ferhat/aws-chunked

Conversation

@ferhatelmas
Copy link
Member

@ferhatelmas ferhatelmas commented Mar 12, 2026

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

aws-chunked uploads (s3 streaming signature v4) could be incorrectly rejected or enforcing wrong size.

What is the new behavior?

  • Reorder pipelines to decode signature first then do byte limit check. Otherwise raw body is checked, which is larger due to signature metadata.
  • Prefer x-amz-decoded-content-length (actual payload size) over content-length (encoded size with chunk signatures). This prevents false EntityTooLarge errors on valid uploads.
  • Replace the PassThrough no-op fallback with pipelineWithOptionalStreamingSignature, which only includes the signature transform when it exists.
  • Improve test coverage.

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
@ferhatelmas ferhatelmas requested a review from a team as a code owner March 12, 2026 11:57
@ferhatelmas ferhatelmas merged commit a158da1 into master Mar 12, 2026
3 checks passed
@ferhatelmas ferhatelmas deleted the ferhat/aws-chunked branch March 12, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants