Closed
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::H2
variant ofBody
to include anOption<u64>
. - Update the
Body::h2
constructor to take a secong argument,Option<u64>
. - Update both
proto::h2::client
andproto::h2::server
to look for and parse acontent-length
header before callingBody::h2
.