fix(client): improve keep-alive of bodyless Responses

This commit is contained in:
Sean McArthur
2015-08-05 16:45:54 -07:00
parent 31f117ea08
commit 67c284a96a
4 changed files with 15 additions and 2 deletions

View File

@@ -203,6 +203,13 @@ impl HttpMessage for Http11Message {
})
}
fn has_body(&self) -> bool {
match self.reader {
Some(EmptyReader(..)) => false,
_ => true
}
}
#[cfg(feature = "timeouts")]
#[inline]
fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {