-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
HTTP/1: Support streaming requests of unknown length #506
Merged
Conversation
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #506 +/- ##
==========================================
+ Coverage 79.41% 79.45% +0.03%
==========================================
Files 27 27
Lines 11621 11666 +45
==========================================
+ Hits 9229 9269 +40
- Misses 2392 2397 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
TingDaoK
approved these changes
Mar 13, 2025
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.
minor comments
graebm
added a commit
to awslabs/aws-crt-cpp
that referenced
this pull request
Mar 17, 2025
**Issue:** aws-sdk-cpp needs to send streaming requests of unknown content length. This isn't currently supported in our HTTP/1 client. **Description of changes:** - Update submodules: aws-c-auth v0.8.5 -> v0.8.6 aws-c-cal v0.8.3 -> v0.8.7 aws-c-common v0.11.1 -> v0.12.0 aws-c-event-stream v0.5.2 -> v0.5.4 aws-c-http v0.9.3 -> v0.9.5 aws-c-io v0.16.0 -> v0.17.0 aws-c-s3 v0.7.11 -> v0.7.13 aws-lc v1.46.1 -> v1.48.4 s2n v1.5.13 -> v1.5.14 - Bring in change that allows HTTP/1 streams of unknown length: - awslabs/aws-c-http#506 - Remove hack in Base64 decoded logic, which is no longer necessary due to this change: - awslabs/aws-c-common#1188
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
Issue:
aws-sdk-cpp needs to send streaming requests of unknown content length. This isn't currently supported in our HTTP/1 client. (our HTTP/2 client does already support this)
Background:
The HTTP/1 client already supported these use cases:
write_chunk()
API.But it wasn't possible to send a stream of unknown length without doing extra copies (read to intermediate buffer, then send that buffer via write_chunk() API).
Description of changes:
Support input streams of unknown length via chunked encoding.
When reading from the stream, leave a bit of space at the start and end of the aws_io_message buffer for the chunk prefix and suffix. Then go back and write in the prefix and suffix afterwards. No unnecessary copies are involved.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.