1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-23 00:26:34 +00:00

Drop connection if request's payload is not fulle consumed #236

This commit is contained in:
Nikolay Kim 2018-05-21 18:54:17 -07:00
parent 577a509875
commit 90968d4333
2 changed files with 9 additions and 1 deletions

View file

@ -1,5 +1,8 @@
# Changes # Changes
* Drop connection if request's payload is not fulle consumed #236
## 0.6.8 (2018-05-20) ## 0.6.8 (2018-05-20)
* Fix scope resource path extractor #234 * Fix scope resource path extractor #234

View file

@ -270,7 +270,12 @@ where
debug!("Error sending data: {}", err); debug!("Error sending data: {}", err);
return Err(()); return Err(());
} }
_ => (), Ok(Async::Ready(_)) => {
// non consumed payload in that case close connection
if self.payload.is_some() && self.tasks.is_empty() {
return Ok(Async::Ready(false))
}
}
} }
} }