mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
Fix issue with 'Connection: close' in ClientRequest
This commit is contained in:
parent
8393d09a0f
commit
3ccbce6bc8
@ -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 New Issue
Block a user