diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index d1a043d8d..69abcfba6 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [0.1.5] - 2019-05-xx + +### Fixed + +* Clean up response extensions in response pool #817 + + ## [0.1.4] - 2019-04-24 ### Added diff --git a/actix-http/src/error.rs b/actix-http/src/error.rs index 1768c9543..4913c3d9d 100644 --- a/actix-http/src/error.rs +++ b/actix-http/src/error.rs @@ -137,7 +137,7 @@ impl ResponseError for TimeoutError { #[display(fmt = "UnknownError")] struct UnitError; -/// `InternalServerError` for `JsonError` +/// `InternalServerError` for `UnitError` impl ResponseError for UnitError {} /// `InternalServerError` for `JsonError` @@ -150,11 +150,11 @@ impl ResponseError for FormError {} impl ResponseError for TimerError {} #[cfg(feature = "ssl")] -/// `InternalServerError` for `SslError` +/// `InternalServerError` for `openssl::ssl::Error` impl ResponseError for openssl::ssl::Error {} #[cfg(feature = "ssl")] -/// `InternalServerError` for `SslError` +/// `InternalServerError` for `openssl::ssl::HandshakeError` impl ResponseError for openssl::ssl::HandshakeError {} /// Return `BAD_REQUEST` for `de::value::Error` diff --git a/actix-http/src/message.rs b/actix-http/src/message.rs index c279aaebf..f3c01a12b 100644 --- a/actix-http/src/message.rs +++ b/actix-http/src/message.rs @@ -449,6 +449,7 @@ impl BoxedResponsePool { fn release(&self, msg: Box) { let v = &mut self.0.borrow_mut(); if v.len() < 128 { + msg.extensions.borrow_mut().clear(); v.push(msg); } } diff --git a/awc/src/error.rs b/awc/src/error.rs index 20654bdf4..f78355c67 100644 --- a/awc/src/error.rs +++ b/awc/src/error.rs @@ -65,7 +65,7 @@ pub enum JsonPayloadError { Payload(PayloadError), } -/// Return `InternlaServerError` for `JsonPayloadError` +/// Return `InternalServerError` for `JsonPayloadError` impl ResponseError for JsonPayloadError { fn error_response(&self) -> Response { Response::new(StatusCode::INTERNAL_SERVER_ERROR)