1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 23:51:06 +01:00

update to actix web v4 beta 18 (#218)

This commit is contained in:
Rob Ede 2021-12-29 10:22:56 +00:00 committed by GitHub
parent 5f17026a55
commit 0d12201073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 22 additions and 8 deletions

View File

@ -14,3 +14,8 @@ members = [
[patch.crates-io]
actix-cors = { path = "actix-cors" }
actix-session = { path = "actix-session" }
# uncomment to quickly test against local actix-web repo
# actix-http = { path = "../actix-web/actix-http" }
# actix-web = { path = "../actix-web" }
# awc = { path = "../actix-web/awc" }

View File

@ -1,8 +1,11 @@
# Changes
## Unreleased - 2021-xx-xx
- Update `actix-web` dependency to `4.0.0.beta-18`. [#218]
- Minimum supported Rust version (MSRV) is now 1.54.
[#218]: https://github.com/actix/actix-extras/pull/218
## 0.4.0-beta.6 - 2021-12-18
- Update `actix-web` dependency to `4.0.0.beta-15`. [#216]

View File

@ -16,12 +16,12 @@ path = "src/lib.rs"
[dependencies]
actix-service = "2"
actix-utils = "3"
actix-web = { version = "4.0.0-beta.17", default-features = false, features = ["cookies", "secure-cookies"] }
actix-web = { version = "4.0.0-beta.18", default-features = false, features = ["cookies", "secure-cookies"] }
futures-util = { version = "0.3.7", default-features = false }
serde = "1.0"
serde_json = "1.0"
time = "0.2.23"
time = "0.3"
[dev-dependencies]
actix-http = "3.0.0-beta.15"

View File

@ -1,8 +1,11 @@
# Changes
## Unreleased - 2021-xx-xx
- Update `actix-web` dependency to `4.0.0.beta-18`. [#218]
- Minimum supported Rust version (MSRV) is now 1.54.
[#218]: https://github.com/actix/actix-extras/pull/218
## 0.10.0-beta.4 - 2021-12-12
- A session will be created in Redis if and only if there is some data inside the session state. This reduces the performance impact of `RedisSession` on routes that do not leverage sessions. [#207]

View File

@ -40,12 +40,12 @@ derive_more = "0.99.2"
futures-core = { version = "0.3.7", default-features = false }
redis2 = { package = "redis", version = "0.19.0", features = ["tokio-comp", "tokio-native-tls-comp"] }
redis-async = { version = "0.8", default-features = false, features = ["tokio10"] }
time = "0.2.23"
time = "0.3"
tokio = { version = "1", features = ["sync"] }
tokio-util = "0.6.1"
# actix-session
actix-web = { version = "4.0.0-beta.17", default_features = false, optional = true }
actix-web = { version = "4.0.0-beta.18", default_features = false, optional = true }
actix-session = { version = "0.5.0-beta.6", optional = true }
rand = { version = "0.8.0", optional = true }
serde = { version = "1.0.101", optional = true }

View File

@ -363,7 +363,7 @@ impl Inner {
fn remove_cookie<B>(&self, res: &mut ServiceResponse<B>) -> Result<(), Error> {
let mut cookie = Cookie::named(self.name.clone());
cookie.set_value("");
cookie.set_max_age(Duration::zero());
cookie.set_max_age(Duration::ZERO);
cookie.set_expires(OffsetDateTime::now_utc() - Duration::days(365));
let val =

View File

@ -1,8 +1,11 @@
# Changes
## Unreleased - 2021-xx-xx
- Update `actix-web` dependency to `4.0.0.beta-18`. [#218]
- Minimum supported Rust version (MSRV) is now 1.54.
[#218]: https://github.com/actix/actix-extras/pull/218
## 0.5.0-beta.6 - 2021-12-18
- Update `actix-web` dependency to `4.0.0.beta-15`. [#216]

View File

@ -20,14 +20,14 @@ cookie-session = ["actix-web/secure-cookies"]
[dependencies]
actix-service = "2"
actix-utils = "3"
actix-web = { version = "4.0.0-beta.17", default_features = false, features = ["cookies"] }
actix-web = { version = "4.0.0-beta.18", default_features = false, features = ["cookies"] }
derive_more = "0.99.5"
futures-util = { version = "0.3.7", default-features = false }
log = "0.4"
serde = "1.0"
serde_json = "1.0"
time = "0.2.23"
time = "0.3"
[dev-dependencies]
actix-rt = "2"

View File

@ -127,7 +127,7 @@ impl CookieSessionInner {
let mut cookie = Cookie::named(self.name.clone());
cookie.set_path(self.path.clone());
cookie.set_value("");
cookie.set_max_age(Duration::zero());
cookie.set_max_age(Duration::ZERO);
cookie.set_expires(OffsetDateTime::now_utc() - Duration::days(365));
let val = HeaderValue::from_str(&cookie.to_string())?;