1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 00:50:20 +02:00

handle application prefix for handlers; use handler for StaticFiles

This commit is contained in:
Nikolay Kim
2018-01-02 15:23:31 -08:00
parent 77ba1de305
commit f0fdcc9936
4 changed files with 64 additions and 19 deletions

View File

@@ -677,7 +677,14 @@ impl<S, H> ProcessResponse<S, H> {
// response is completed
match self.iostate {
IOState::Done => {
io.write_eof();
match io.write_eof() {
Ok(_) => (),
Err(err) => {
debug!("Error sending data: {}", err);
info.error = Some(err.into());
return Ok(FinishingMiddlewares::init(info, self.resp))
}
}
self.resp.set_response_size(io.written());
Ok(FinishingMiddlewares::init(info, self.resp))
}