fix(server): improve detection of when a Response can have a body

By knowing if the incoming Request was a HEAD, or checking for 204 or
304 status codes, the server will do a better job of either adding
or removing `Content-Length` and `Transfer-Encoding` headers.

Closes #1257
This commit is contained in:
Sean McArthur
2017-07-13 11:08:14 -07:00
parent 5f47d72347
commit 673e5cb1a3
6 changed files with 609 additions and 473 deletions

View File

@@ -1,6 +1,6 @@
#![doc(html_root_url = "https://docs.rs/hyper/0.11.1")]
#![deny(missing_docs)]
#![deny(warnings)]
//#![deny(warnings)]
#![deny(missing_debug_implementations)]
#![cfg_attr(all(test, feature = "nightly"), feature(test))]