Skip to content
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

Fix HTTPBodySequence for large requests (adds AsyncBufferedPrefixSequence) #140

Merged
merged 3 commits into from
Feb 4, 2025

Conversation

swhitty
Copy link
Owner

@swhitty swhitty commented Feb 4, 2025

fixes #139

HTTPRequest.bodySequence is aways backed by one of the the following concrete types:

A bug exists when AsyncSocketReadSequence is used, because the sequence is only terminated when the underlying socket is closed, the sequence hangs when all bytes are read but the socket remains open.

This PR adds AsyncBufferedPrefixSequence which wraps the underlying AsyncSocketReadSequence terminating the sequence when all bytes have been read.

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.83%. Comparing base (fe9437d) to head (4231165).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
- Coverage   94.85%   94.83%   -0.02%     
==========================================
  Files          60       61       +1     
  Lines        3943     3971      +28     
==========================================
+ Hits         3740     3766      +26     
- Misses        203      205       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@swhitty swhitty merged commit 9c72385 into main Feb 4, 2025
17 of 18 checks passed
@swhitty swhitty deleted the AsyncBufferedPrefixSequence branch February 4, 2025 11:14
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.

Async bodySequence never completes
1 participant