From 6e00eef63a58ad8d9dbf4337f68ce075309b8fbe Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 3 May 2019 18:30:00 -0300 Subject: [PATCH 1/2] awc: Fix typo on ResponseError documentation (#815) * awc: Fix typo on ResponseError documentation Signed-off-by: Otavio Salvador * http: Fix typo on ResponseError documentation Signed-off-by: Otavio Salvador * http: Expand type names for openssl related errors documentation Signed-off-by: Otavio Salvador --- actix-http/src/error.rs | 6 +++--- awc/src/error.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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/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) From fc19ce41c42ded0143c999d94ee6cb917641b98e Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 3 May 2019 15:26:34 -0700 Subject: [PATCH 2/2] Clean up response extensions in response pool #817 --- actix-http/CHANGES.md | 7 +++++++ actix-http/src/message.rs | 1 + 2 files changed, 8 insertions(+) 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/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); } }