mirror of
https://github.com/actix/actix-web.git
synced 2024-11-27 12:01:15 +00:00
Fix issue with 'Connection: close' in ClientRequest
This commit is contained in:
parent
8393d09a0f
commit
3ccbce6bc8
1 changed files with 4 additions and 2 deletions
|
@ -41,7 +41,8 @@ impl HttpResponseParser {
|
|||
// if buf is empty parse_message will always return NotReady, let's avoid that
|
||||
if buf.is_empty() {
|
||||
match io.read_available(buf) {
|
||||
Ok(Async::Ready((_, true))) => {
|
||||
Ok(Async::Ready((true, true))) => (),
|
||||
Ok(Async::Ready((false, true))) => {
|
||||
return Err(HttpResponseParserError::Disconnect)
|
||||
}
|
||||
Ok(Async::Ready((_, false))) => (),
|
||||
|
@ -63,7 +64,8 @@ impl HttpResponseParser {
|
|||
return Err(HttpResponseParserError::Error(ParseError::TooLarge));
|
||||
}
|
||||
match io.read_available(buf) {
|
||||
Ok(Async::Ready((_, true))) => {
|
||||
Ok(Async::Ready((true, true))) => (),
|
||||
Ok(Async::Ready((false, true))) => {
|
||||
return Err(HttpResponseParserError::Disconnect)
|
||||
}
|
||||
Ok(Async::Ready((_, false))) => (),
|
||||
|
|
Loading…
Reference in a new issue