mirror of https://github.com/fafhrd91/actix-web
Merge branch 'master' into master
This commit is contained in:
commit
2c8c49e0c5
|
@ -1,5 +1,12 @@
|
||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [0.1.5] - 2019-05-xx
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Clean up response extensions in response pool #817
|
||||||
|
|
||||||
|
|
||||||
## [0.1.4] - 2019-04-24
|
## [0.1.4] - 2019-04-24
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -137,7 +137,7 @@ impl<E: ResponseError> ResponseError for TimeoutError<E> {
|
||||||
#[display(fmt = "UnknownError")]
|
#[display(fmt = "UnknownError")]
|
||||||
struct UnitError;
|
struct UnitError;
|
||||||
|
|
||||||
/// `InternalServerError` for `JsonError`
|
/// `InternalServerError` for `UnitError`
|
||||||
impl ResponseError for UnitError {}
|
impl ResponseError for UnitError {}
|
||||||
|
|
||||||
/// `InternalServerError` for `JsonError`
|
/// `InternalServerError` for `JsonError`
|
||||||
|
@ -150,11 +150,11 @@ impl ResponseError for FormError {}
|
||||||
impl ResponseError for TimerError {}
|
impl ResponseError for TimerError {}
|
||||||
|
|
||||||
#[cfg(feature = "ssl")]
|
#[cfg(feature = "ssl")]
|
||||||
/// `InternalServerError` for `SslError`
|
/// `InternalServerError` for `openssl::ssl::Error`
|
||||||
impl ResponseError for openssl::ssl::Error {}
|
impl ResponseError for openssl::ssl::Error {}
|
||||||
|
|
||||||
#[cfg(feature = "ssl")]
|
#[cfg(feature = "ssl")]
|
||||||
/// `InternalServerError` for `SslError`
|
/// `InternalServerError` for `openssl::ssl::HandshakeError`
|
||||||
impl ResponseError for openssl::ssl::HandshakeError<tokio_tcp::TcpStream> {}
|
impl ResponseError for openssl::ssl::HandshakeError<tokio_tcp::TcpStream> {}
|
||||||
|
|
||||||
/// Return `BAD_REQUEST` for `de::value::Error`
|
/// Return `BAD_REQUEST` for `de::value::Error`
|
||||||
|
|
|
@ -449,6 +449,7 @@ impl BoxedResponsePool {
|
||||||
fn release(&self, msg: Box<ResponseHead>) {
|
fn release(&self, msg: Box<ResponseHead>) {
|
||||||
let v = &mut self.0.borrow_mut();
|
let v = &mut self.0.borrow_mut();
|
||||||
if v.len() < 128 {
|
if v.len() < 128 {
|
||||||
|
msg.extensions.borrow_mut().clear();
|
||||||
v.push(msg);
|
v.push(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ pub enum JsonPayloadError {
|
||||||
Payload(PayloadError),
|
Payload(PayloadError),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return `InternlaServerError` for `JsonPayloadError`
|
/// Return `InternalServerError` for `JsonPayloadError`
|
||||||
impl ResponseError for JsonPayloadError {
|
impl ResponseError for JsonPayloadError {
|
||||||
fn error_response(&self) -> Response {
|
fn error_response(&self) -> Response {
|
||||||
Response::new(StatusCode::INTERNAL_SERVER_ERROR)
|
Response::new(StatusCode::INTERNAL_SERVER_ERROR)
|
||||||
|
|
Loading…
Reference in New Issue