Skip to content

Optimize SigV4 and add S3 content-sha256 handling#1217

Merged
mtdowling merged 1 commit into
mainfrom
optimize-sigv4
May 27, 2026
Merged

Optimize SigV4 and add S3 content-sha256 handling#1217
mtdowling merged 1 commit into
mainfrom
optimize-sigv4

Conversation

@mtdowling
Copy link
Copy Markdown
Member

What behavior changes?

Switch signing to in-place strided buffers in SigningResources, removing the per-call TreeMap/ArrayList/Pair allocations and one UTF-8 encoder pass. Add x-amz-content-sha256 to the canonical request and wire request for s3/s3express; honor pre-set X-Amz-Date, security-token, and content- sha256 headers; throw on unknown-length payloads instead of signing as empty; treat port -1 as default in the Host header; fast-path the already-canonical query string. Test runner ignores Content-Length when comparing requests (signature-irrelevant; auto-derived locally).

Why is this change needed?

performance, s3 compat

How was this validated?

tests, called s3

What should reviewers focus on?

Additional Links


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Switch signing to in-place strided buffers in SigningResources, removing
the per-call TreeMap/ArrayList/Pair allocations and one UTF-8 encoder
pass. Add x-amz-content-sha256 to the canonical request and wire request
for s3/s3express; honor pre-set X-Amz-Date, security-token, and content-
sha256 headers; throw on unknown-length payloads instead of signing as
empty; treat port -1 as default in the Host header; fast-path the
already-canonical query string. Test runner ignores Content-Length when
comparing requests (signature-irrelevant; auto-derived locally).
@mtdowling mtdowling enabled auto-merge (rebase) May 26, 2026 19:58
@mtdowling mtdowling disabled auto-merge May 26, 2026 21:46
@mtdowling mtdowling merged commit af66736 into main May 27, 2026
6 checks passed
@mtdowling mtdowling deleted the optimize-sigv4 branch May 27, 2026 21:43
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