mirror of
https://github.com/actix/actix-web.git
synced 2024-12-19 06:36:36 +00:00
do not add error response if current response is in process
This commit is contained in:
parent
a1b7d5995e
commit
6b2248ecdf
3 changed files with 10 additions and 9 deletions
|
@ -60,7 +60,7 @@ pub use context::HttpContext;
|
||||||
pub use staticfiles::StaticFiles;
|
pub use staticfiles::StaticFiles;
|
||||||
|
|
||||||
// re-exports
|
// re-exports
|
||||||
pub use http::{Method, StatusCode};
|
pub use http::{Method, StatusCode, Version};
|
||||||
pub use cookie::{Cookie, CookieBuilder};
|
pub use cookie::{Cookie, CookieBuilder};
|
||||||
pub use cookie::{ParseError as CookieParseError};
|
pub use cookie::{ParseError as CookieParseError};
|
||||||
pub use http_range::{HttpRange, HttpRangeParseError};
|
pub use http_range::{HttpRange, HttpRangeParseError};
|
||||||
|
|
|
@ -324,13 +324,15 @@ impl<T, A, H> Future for HttpChannel<T, A, H>
|
||||||
// tasks need to be completed
|
// tasks need to be completed
|
||||||
self.error = true;
|
self.error = true;
|
||||||
|
|
||||||
if let ReaderError::Error(err) = err {
|
if self.items.is_empty() {
|
||||||
self.items.push_back(
|
if let ReaderError::Error(err) = err {
|
||||||
Entry {task: Task::reply(err),
|
self.items.push_back(
|
||||||
req: UnsafeCell::new(HttpRequest::for_error()),
|
Entry {task: Task::reply(err),
|
||||||
eof: false,
|
req: UnsafeCell::new(HttpRequest::for_error()),
|
||||||
error: false,
|
eof: false,
|
||||||
finished: false});
|
error: false,
|
||||||
|
finished: false});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(Async::NotReady) => {
|
Ok(Async::NotReady) => {
|
||||||
|
|
|
@ -412,7 +412,6 @@ impl Task {
|
||||||
fut.borrow_mut().set()
|
fut.borrow_mut().set()
|
||||||
}
|
}
|
||||||
self.drain.clear();
|
self.drain.clear();
|
||||||
// return self.poll_io(io, req);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// response is completed
|
// response is completed
|
||||||
|
|
Loading…
Reference in a new issue