-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Incoming HTTP2 bodies should know content_length #1546
Copy link
Copy link
Closed
Labels
A-bodyArea: body streaming.Area: body streaming.A-http2Area: HTTP/2 specific.Area: HTTP/2 specific.C-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.E-easyEffort: easy. A task that would be a great starting point for a new contributor.Effort: easy. A task that would be a great starting point for a new contributor.
Description
When receiving a body over HTTP2, the Body::content_length call should be able to say how big it is if the content-length header was present.
Steps to fix
- Update
Kind::H2variant ofBodyto include anOption<u64>. - Update the
Body::h2constructor to take a secong argument,Option<u64>. - Update both
proto::h2::clientandproto::h2::serverto look for and parse acontent-lengthheader before callingBody::h2.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-bodyArea: body streaming.Area: body streaming.A-http2Area: HTTP/2 specific.Area: HTTP/2 specific.C-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.E-easyEffort: easy. A task that would be a great starting point for a new contributor.Effort: easy. A task that would be a great starting point for a new contributor.