diff --git a/CHANGES.md b/CHANGES.md index ab9caa7bd..da4a77a80 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,10 +10,10 @@ ### Changed * Use `sha-1` crate instead of unmaintained `sha1` crate - * Skip empty chunks when returning response from a `Stream` #1308 - * Update the `time` dependency to 0.2.7 +* Update `actix-tls` dependency to 2.0.0-alpha.1 +* Update `rustls` dependency to 0.17 ## [2.0.0] - 2019-12-25 diff --git a/Cargo.toml b/Cargo.toml index 125008870..fa29c225f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,7 +68,7 @@ actix-server = "1.0.0" actix-testing = "1.0.0" actix-macros = "0.1.0" actix-threadpool = "0.3.1" -actix-tls = "1.0.0" +actix-tls = "2.0.0-alpha.1" actix-web-codegen = "0.2.0" actix-http = "2.0.0-alpha.1" @@ -90,7 +90,7 @@ serde_urlencoded = "0.6.1" time = { version = "0.2.7", default-features = false, features = ["std"] } url = "2.1" open-ssl = { version="0.10", package = "openssl", optional = true } -rust-tls = { version = "0.16.0", package = "rustls", optional = true } +rust-tls = { version = "0.17.0", package = "rustls", optional = true } [dev-dependencies] actix = "0.10.0-alpha.1" diff --git a/actix-framed/Cargo.toml b/actix-framed/Cargo.toml index dc974e402..133b8083d 100644 --- a/actix-framed/Cargo.toml +++ b/actix-framed/Cargo.toml @@ -32,6 +32,6 @@ log = "0.4" [dev-dependencies] actix-server = "1.0.0" -actix-connect = { version = "1.0.0", features=["openssl"] } +actix-connect = { version = "2.0.0-alpha.1", features=["openssl"] } actix-http-test = { version = "1.0.0", features=["openssl"] } actix-utils = "1.0.3" diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index 0a92c415b..ccfdc81d6 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -1,9 +1,11 @@ # Changes -## [NEXT] - 2020-02-27 +## [2.0.0-alpha.2] - someday ### Changed +* Update `actix-connect` and `actix-tls` dependency to 2.0.0-alpha.1 + * Change default initial window size and connection window size for HTTP2 to 2MB and 1MB respectively to improve download speed for awc when downloading large objects. * client::Connector accepts initial_window_size and initial_connection_window_size HTTP2 configuration @@ -15,11 +17,8 @@ ### Changed * Update the `time` dependency to 0.2.7. - * Moved actors messages support from actix crate, enabled with feature `actors`. - * Breaking change: trait MessageBody requires Unpin and accepting Pin<&mut Self> instead of &mut self in the poll_next(). - * MessageBody is not implemented for &'static [u8] anymore. ### Fixed diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index 356e68405..df9653aa3 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -45,11 +45,11 @@ actors = ["actix"] [dependencies] actix-service = "1.0.5" actix-codec = "0.2.0" -actix-connect = "1.0.2" +actix-connect = "2.0.0-alpha.1" actix-utils = "1.0.6" actix-rt = "1.0.0" actix-threadpool = "0.3.1" -actix-tls = { version = "1.0.0", optional = true } +actix-tls = { version = "2.0.0-alpha.1", optional = true } actix = { version = "0.10.0-alpha.1", optional = true } base64 = "0.11" @@ -94,15 +94,15 @@ fail-ure = { version = "0.1.5", package="failure", optional = true } [dev-dependencies] actix-server = "1.0.1" -actix-connect = { version = "1.0.2", features=["openssl"] } +actix-connect = { version = "2.0.0-alpha.1", features=["openssl"] } actix-http-test = { version = "1.0.0", features=["openssl"] } -actix-tls = { version = "1.0.0", features=["openssl"] } +actix-tls = { version = "2.0.0-alpha.1", features=["openssl"] } criterion = "0.3" futures = "0.3.1" env_logger = "0.7" serde_derive = "1.0" open-ssl = { version="0.10", package = "openssl" } -rust-tls = { version="0.16", package = "rustls" } +rust-tls = { version="0.17", package = "rustls" } [[bench]] name = "content-length" diff --git a/actix-http/src/h1/dispatcher.rs b/actix-http/src/h1/dispatcher.rs index 6276653d3..ffdcd8d9b 100644 --- a/actix-http/src/h1/dispatcher.rs +++ b/actix-http/src/h1/dispatcher.rs @@ -73,7 +73,7 @@ where U::Error: fmt::Display, { Normal(#[pin] InnerDispatcher), - Upgrade(#[pin] U::Future), + Upgrade(Pin>), } #[pin_project] @@ -123,8 +123,8 @@ where B: MessageBody, { None, - ExpectCall(#[pin] X::Future), - ServiceCall(#[pin] S::Future), + ExpectCall(Pin>), + ServiceCall(Pin>), SendPayload(#[pin] ResponseBody), } @@ -391,11 +391,11 @@ where } None => None, }, - State::ExpectCall(fut) => match fut.poll(cx) { + State::ExpectCall(fut) => match fut.as_mut().poll(cx) { Poll::Ready(Ok(req)) => { self.as_mut().send_continue(); this = self.as_mut().project(); - this.state.set(State::ServiceCall(this.service.call(req))); + this.state.set(State::ServiceCall(Box::pin(this.service.call(req)))); continue; } Poll::Ready(Err(e)) => { @@ -405,7 +405,7 @@ where } Poll::Pending => None, }, - State::ServiceCall(fut) => match fut.poll(cx) { + State::ServiceCall(fut) => match fut.as_mut().poll(cx) { Poll::Ready(Ok(res)) => { let (res, body) = res.into().replace_body(()); let state = self.as_mut().send_response(res, body)?; @@ -485,8 +485,8 @@ where ) -> Result, DispatchError> { // Handle `EXPECT: 100-Continue` header let req = if req.head().expect() { - let mut task = self.as_mut().project().expect.call(req); - match unsafe { Pin::new_unchecked(&mut task) }.poll(cx) { + let mut task = Box::pin(self.as_mut().project().expect.call(req)); + match task.as_mut().poll(cx) { Poll::Ready(Ok(req)) => { self.as_mut().send_continue(); req @@ -504,8 +504,8 @@ where }; // Call service - let mut task = self.as_mut().project().service.call(req); - match unsafe { Pin::new_unchecked(&mut task) }.poll(cx) { + let mut task = Box::pin(self.as_mut().project().service.call(req)); + match task.as_mut().poll(cx) { Poll::Ready(Ok(res)) => { let (res, body) = res.into().replace_body(()); self.send_response(res, body) @@ -807,7 +807,7 @@ where self.as_mut() .project() .inner - .set(DispatcherState::Upgrade(upgrade)); + .set(DispatcherState::Upgrade(Box::pin(upgrade))); return self.poll(cx); } @@ -855,7 +855,7 @@ where } } } - DispatcherState::Upgrade(fut) => fut.poll(cx).map_err(|e| { + DispatcherState::Upgrade(fut) => fut.as_mut().poll(cx).map_err(|e| { error!("Upgrade handler error: {}", e); DispatchError::Upgrade }), diff --git a/awc/Cargo.toml b/awc/Cargo.toml index 71b23ece3..d27615f7a 100644 --- a/awc/Cargo.toml +++ b/awc/Cargo.toml @@ -51,16 +51,16 @@ serde = "1.0" serde_json = "1.0" serde_urlencoded = "0.6.1" open-ssl = { version="0.10", package="openssl", optional = true } -rust-tls = { version = "0.16.0", package="rustls", optional = true, features = ["dangerous_configuration"] } +rust-tls = { version = "0.17.0", package="rustls", optional = true, features = ["dangerous_configuration"] } [dev-dependencies] -actix-connect = { version = "1.0.1", features=["openssl"] } +actix-connect = { version = "2.0.0-alpha.1", features=["openssl"] } actix-web = { version = "2.0.0", features=["openssl"] } actix-http = { version = "2.0.0-alpha.1", features=["openssl"] } actix-http-test = { version = "1.0.0", features=["openssl"] } actix-utils = "1.0.3" actix-server = "1.0.0" -actix-tls = { version = "1.0.0", features=["openssl", "rustls"] } +actix-tls = { version = "2.0.0-alpha.1", features=["openssl", "rustls"] } brotli2 = "0.3.2" flate2 = "1.0.13" futures = "0.3.1" diff --git a/test-server/CHANGES.md b/test-server/CHANGES.md index 96c010355..3a990a594 100644 --- a/test-server/CHANGES.md +++ b/test-server/CHANGES.md @@ -3,6 +3,7 @@ ## [Unreleased] - 2020-xx-xx * Update the `time` dependency to 0.2.7 +* Update `actix-connect` dependency to 2.0.0-alpha.1 ## [1.0.0] - 2019-12-13 diff --git a/test-server/Cargo.toml b/test-server/Cargo.toml index 117c1a318..ba8e1c9ea 100644 --- a/test-server/Cargo.toml +++ b/test-server/Cargo.toml @@ -32,7 +32,7 @@ openssl = ["open-ssl", "awc/openssl"] [dependencies] actix-service = "1.0.1" actix-codec = "0.2.0" -actix-connect = "1.0.0" +actix-connect = "2.0.0-alpha.1" actix-utils = "1.0.3" actix-rt = "1.0.0" actix-server = "1.0.0"