-
Notifications
You must be signed in to change notification settings - Fork 189
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
Feature: add support for aws-chunked content encoding #1501
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1c69093
add: support for unsigned aws-chunked content encoding
Velfi d7c71b0
Merge branch 'main' into feature/aws-chunked-content-encoding
Velfi 74ef713
add: aws-smithy-checksums to CrateSet.key
Velfi aa6408f
refactor: API of AwsChunkedBodyOptions
Velfi c2512cd
Update CHANGELOG.next.toml
Velfi 2e8d027
Merge branch 'main' into feature/aws-chunked-content-encoding
Velfi 6cab554
update: CHANGELOG.next.toml message
Velfi 2dd7bef
refactor: aws-chunked trailer encoding and size calculation
Velfi f25a10a
udpate: emit error instead of panicking for incorrect trailer length
Velfi fee1750
add: test ensuring trailer serialization and length calculation stay …
Velfi df7f352
Merge branch 'main' into feature/aws-chunked-content-encoding
Velfi 8a1054c
update: avoid repeated allocations in trailers_as_aws_chunked_bytes
Velfi ebefe0d
Merge branch 'main' into feature/aws-chunked-content-encoding
Velfi 6501601
add: aws-chunked body test for inner bodies that emit intermittent ch…
Velfi 3dfe669
Merge branch 'main' into feature/aws-chunked-content-encoding
Velfi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
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.
I see @rcoh suggested making an error for this, but I think this is a case where we have a bug in our code, and there's little to no value for a customer in matching on this error. It's a case that simply should not happen if the code is correct, so an assertion was warranted.
On the flip side, with an assertion, it would silently allow the lengths to mismatch when compiled in release mode, which would likely result in a server-side error response. I think this is OK though, since a bug with this should not have been released in the first place if it was adequately tested.
We might want to proptest header names/values for the size prediction vs. the rendering to be absolutely certain they cannot mismatch. I think they can right now in the case where a header value has Unicode characters in it since the length predictor function is using string length instead of byte length.
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.
Another thing we could consider is just getting rid of the length prediction entirely. Just render the trailers to a
BytesMut
when the length is initially needed, and store thatBytesMut
in theAwsChunkedBody
for later.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.
@jdisanti only
debug_assert
doesn't fail in release modeThere 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.
I added a new error for when stream_length is set incorrectly