generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 222
Refactor RequestChecksumInterceptor into distinct interceptors
#4384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ysaito1001
merged 5 commits into
main
from
ysaito/refactor-http-request-chunksum-interceptor
Nov 10, 2025
Merged
Refactor RequestChecksumInterceptor into distinct interceptors
#4384
ysaito1001
merged 5 commits into
main
from
ysaito/refactor-http-request-chunksum-interceptor
Nov 10, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
landonxjames
approved these changes
Nov 7, 2025
Contributor
landonxjames
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a few questions, but no blockers
...aws-sdk/src/main/kotlin/software/amazon/smithy/rustsdk/AwsChunkedContentEncodingDecorator.kt
Show resolved
Hide resolved
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
This PR breaks up
RequestChecksumInterceptorinto two interceptors:RequestChecksumInterceptorandAwsChunkedContentEncodingInterceptorwith additional code restructuring to support the upcoming aws-chunked content encoding enhancement.Description
RequestChecksumInterceptorpreviously handled two distinct responsibilities:This refactor extracts the second responsibility (aws-chunked logic) into
AwsChunkedContentEncodingInterceptor, aiming to enable it via the dedicated trait when available in Smithy.In addition, both interceptors now wrap bodies in
modify_before_transmitinstead ofmodify_before_signingper design requirements.Tips for merging to
feature/http-1.xThis refactor reluctantly adds
http_0xconstructs that will conflict withfeature/http-1.x. Update these files when merging:aws-inlineable/src/http_request_checksum.rs- Apply same 1.x updates as done in branch (note:test_checksum_body_is_retryablewas removed as it tested a utility only used in streaming cases against non-streaming bodies)aws-inlineable/src/aws_chunked.rs- Use 1.x for header names, values, and body trait methods in unit tests, as inhttp_request_checksum.rsaws/rust-runtime/aws-runtime/src/content_encoding.rs- Needs 1.x updatesto
because the
.encoded_length()method has been moved fromAwsChunkedBodytoAwsChunkedBodyOptions(due to thecontent-lengthheader needing encoded length during signing but body creation deferred tomodify_before_transmit)Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.