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

Skip empty chucks for BodyStream and SizedStream #1308

Merged
merged 6 commits into from
Jan 28, 2020
Merged

Skip empty chucks for BodyStream and SizedStream #1308

merged 6 commits into from
Jan 28, 2020

Conversation

tyranron
Copy link
Member

Fixes #1267

This PR makes BodyStream and SizedStream in actix-http crate to skip empty chunks whicl streaming HTTP response, so omit unexpected termination.

@tyranron
Copy link
Member Author

@JohnTitor I've implemented option 2 described here as the most preferred among commenters. But I'll change it if we should go with another one.

@tyranron tyranron changed the title Skip empty chucks for BodyStream and SizedStream (#1267) Skip empty chucks for BodyStream and SizedStream Jan 22, 2020
actix-http/src/body.rs Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Jan 23, 2020

Codecov Report

Merging #1308 into master will decrease coverage by <.01%.
The diff coverage is 71.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1308      +/-   ##
==========================================
- Coverage   79.43%   79.43%   -0.01%     
==========================================
  Files         146      146              
  Lines       17004    17006       +2     
==========================================
+ Hits        13507    13508       +1     
- Misses       3497     3498       +1
Impacted Files Coverage Δ
src/test.rs 83.96% <ø> (ø) ⬆️
actix-http/src/client/pool.rs 42.85% <0%> (-0.19%) ⬇️
src/extract.rs 86.2% <100%> (+0.24%) ⬆️
actix-http/src/h2/dispatcher.rs 71.25% <83.33%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b14fac0...56a7429. Read the comment docs.

@JohnTitor
Copy link
Member

Could you also update the changelog with the PR number?

@JohnTitor JohnTitor merged commit cdba30d into actix:master Jan 28, 2020
@JohnTitor
Copy link
Member

Thanks!

@tyranron tyranron deleted the 1267-filter-out-empty-chunks branch January 28, 2020 12:17
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.

Streaming response - inconsistent behaviour
5 participants