feat(body): Update Payload to be a trait alias of http_body::Body (#1908)

This commit is contained in:
Lucio Franco
2019-08-22 14:13:27 -07:00
committed by Sean McArthur
parent 49b12c415d
commit 79c32f8953
9 changed files with 84 additions and 100 deletions

View File

@@ -125,7 +125,7 @@ where
let (head, body) = req.into_parts();
let mut req = ::http::Request::from_parts(head, ());
super::strip_connection_headers(req.headers_mut(), true);
if let Some(len) = body.content_length() {
if let Some(len) = body.size_hint().exact() {
headers::set_content_length_if_missing(req.headers_mut(), len);
}
let eos = body.is_end_stream();