diff --git a/CHANGES.md b/CHANGES.md
index 5f8f489fc..f37f8b466 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,4 +1,13 @@
# Changes
+## not released yet
+
+### Added
+
+* Add `middleware::Conditon` that conditionally enables another middleware
+
+### Fixed
+
+* h2 will use error response #1080
## [1.0.7] - 2019-08-29
diff --git a/actix-http/src/h2/dispatcher.rs b/actix-http/src/h2/dispatcher.rs
index 69c620e62..888f9065e 100644
--- a/actix-http/src/h2/dispatcher.rs
+++ b/actix-http/src/h2/dispatcher.rs
@@ -257,8 +257,8 @@ where
}
}
Ok(Async::NotReady) => Ok(Async::NotReady),
- Err(_e) => {
- let res: Response = Response::InternalServerError().finish();
+ Err(e) => {
+ let res: Response = e.into().into();
let (res, body) = res.replace_body(());
let mut send = send.take().unwrap();
diff --git a/actix-http/tests/test_rustls_server.rs b/actix-http/tests/test_rustls_server.rs
index 32b33fce8..b74fd07bf 100644
--- a/actix-http/tests/test_rustls_server.rs
+++ b/actix-http/tests/test_rustls_server.rs
@@ -454,9 +454,9 @@ fn test_h2_service_error() {
});
let response = srv.block_on(srv.sget("/").send()).unwrap();
- assert_eq!(response.status(), http::StatusCode::INTERNAL_SERVER_ERROR);
+ assert_eq!(response.status(), http::StatusCode::BAD_REQUEST);
// read response
let bytes = srv.load_body(response).unwrap();
- assert!(bytes.is_empty());
+ assert_eq!(bytes, Bytes::from_static(b"error"));
}
diff --git a/actix-http/tests/test_ssl_server.rs b/actix-http/tests/test_ssl_server.rs
index f0c82870d..897d92b37 100644
--- a/actix-http/tests/test_ssl_server.rs
+++ b/actix-http/tests/test_ssl_server.rs
@@ -449,11 +449,11 @@ fn test_h2_service_error() {
});
let response = srv.block_on(srv.sget("/").send()).unwrap();
- assert_eq!(response.status(), StatusCode::INTERNAL_SERVER_ERROR);
+ assert_eq!(response.status(), StatusCode::BAD_REQUEST);
// read response
let bytes = srv.load_body(response).unwrap();
- assert!(bytes.is_empty());
+ assert_eq!(bytes, Bytes::from_static(b"error"));
}
#[test]
diff --git a/actix-multipart/CHANGES.md b/actix-multipart/CHANGES.md
index 27333f4c4..365dca286 100644
--- a/actix-multipart/CHANGES.md
+++ b/actix-multipart/CHANGES.md
@@ -1,4 +1,7 @@
# Changes
+## [0.1.4] - 2019-xx-xx
+
+* Multipart handling now parses requests which do not end in CRLF #1038
## [0.1.3] - 2019-08-18
diff --git a/actix-multipart/src/server.rs b/actix-multipart/src/server.rs
index e2111bb7b..3312a580a 100644
--- a/actix-multipart/src/server.rs
+++ b/actix-multipart/src/server.rs
@@ -167,7 +167,7 @@ impl InnerMultipart {
boundary: &str,
) -> Result