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

HTTP2 should respect flow control #1548

Closed
seanmonstar opened this issue Jun 6, 2018 · 0 comments
Closed

HTTP2 should respect flow control #1548

seanmonstar opened this issue Jun 6, 2018 · 0 comments
Labels
A-body Area: body streaming. A-http2 Area: HTTP/2 specific. C-feature Category: feature. This is adding a new feature. E-easy Effort: easy. A task that would be a great starting point for a new contributor.

Comments

@seanmonstar
Copy link
Member

Currently sending bodies will just push unbounded into the h2 buffer. While this works, unbounded buffering is not so great. Instead, hyper should check for existing window capacity before polling the body for data.

Steps to fix

  • Basically, update proto::h2::PipeToSendStream similar to how it was done in this commit.
@seanmonstar seanmonstar added E-easy Effort: easy. A task that would be a great starting point for a new contributor. C-feature Category: feature. This is adding a new feature. A-body Area: body streaming. A-http2 Area: HTTP/2 specific. labels Jun 6, 2018
sfackler added a commit to sfackler/hyper that referenced this issue Jun 10, 2018
This is implemented sligntly differently than what the TODO comment
said, but matches with tower-h2's implementation. h2 already handles the
buffering of the pending chunk and capacity management for it, so we
just want to make sure there's some capacity available (i.e. the
previous chunk has been fully written out).

Closes hyperium#1548
sfackler added a commit to sfackler/hyper that referenced this issue Jun 11, 2018
This is implemented sligntly differently than what the TODO comment
said, but matches with tower-h2's implementation. h2 already handles the
buffering of the pending chunk and capacity management for it, so we
just want to make sure there's some capacity available (i.e. the
previous chunk has been fully written out).

Closes hyperium#1548
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-body Area: body streaming. A-http2 Area: HTTP/2 specific. C-feature Category: feature. This is adding a new feature. E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Projects
None yet
Development

No branches or pull requests

1 participant