You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
seanmonstar opened this issue
Jun 6, 2018
· 0 comments
Labels
A-http2Area: HTTP/2 specific.C-featureCategory: feature. This is adding a new feature.E-easyEffort: easy. A task that would be a great starting point for a new contributor.
For instance, a server replying with Response::new(Body::from("Hello, World!")) over HTTP2 should set the content-length: 13 header.
Steps to fix
In proto::h2::server, before calling SendResponse::send_response, check body.content_length(). If it returns Some(len), check if the headers contain CONTENT_LENGTH, and if not, add the header with the serialized length.
Do the same in proto::h2::client, before calling SendRequest::send_request.
Serializing into a header value can make use of hyper::headers::content_length_value.
A new function, set_content_length_if_not_present, could probably be added to hyper::headers, making use of HeaderMap::entry.
The text was updated successfully, but these errors were encountered:
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-http2
Area: HTTP/2 specific.
labels
Jun 6, 2018
A-http2Area: HTTP/2 specific.C-featureCategory: feature. This is adding a new feature.E-easyEffort: easy. A task that would be a great starting point for a new contributor.
For instance, a server replying with
Response::new(Body::from("Hello, World!"))
over HTTP2 should set thecontent-length: 13
header.Steps to fix
proto::h2::server
, before callingSendResponse::send_response
, checkbody.content_length()
. If it returnsSome(len)
, check if the headers containCONTENT_LENGTH
, and if not, add the header with the serialized length.proto::h2::client
, before callingSendRequest::send_request
.hyper::headers::content_length_value
.set_content_length_if_not_present
, could probably be added tohyper::headers
, making use ofHeaderMap::entry
.The text was updated successfully, but these errors were encountered: