diff --git a/Cargo.lock b/Cargo.lock index 4312abe..588c540 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -294,9 +294,9 @@ checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "cookie" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" +checksum = "3cd91cf61412820176e137621345ee43b3f4423e589e7ae4e50d601d93e35ef8" dependencies = [ "time", "version_check", diff --git a/Cargo.toml b/Cargo.toml index eb6ca26..284d974 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ cached = { version = "0.46.1", features = ["async"] } clap = { version = "4.4.11", default-features = false, features = ["std", "env"] } regex = "1.10.2" serde = { version = "1.0.193", features = ["derive"] } -cookie = "0.17.0" +cookie = "0.18.0" futures-lite = "1.12.0" hyper = { version = "0.14.23", features = ["full"] } hyper-rustls = "0.24.0" diff --git a/src/server.rs b/src/server.rs index 9db7cba..20e48ea 100644 --- a/src/server.rs +++ b/src/server.rs @@ -138,7 +138,7 @@ impl RequestExt for Request
{ .to_str() .unwrap_or_default() .split("; ") - .map(|cookie| Cookie::parse(cookie).unwrap_or_else(|_| Cookie::named(""))) + .map(|cookie| Cookie::parse(cookie).unwrap_or_else(|_| Cookie::from(""))) .collect() }) } @@ -155,7 +155,7 @@ impl ResponseExt for Response { .to_str() .unwrap_or_default() .split("; ") - .map(|cookie| Cookie::parse(cookie).unwrap_or_else(|_| Cookie::named(""))) + .map(|cookie| Cookie::parse(cookie).unwrap_or_else(|_| Cookie::from(""))) .collect() }) } @@ -167,7 +167,7 @@ impl ResponseExt for Response { } fn remove_cookie(&mut self, name: String) { - let mut cookie = Cookie::named(name); + let mut cookie = Cookie::from(name); cookie.set_path("/"); cookie.set_max_age(Duration::seconds(1)); if let Ok(val) = header::HeaderValue::from_str(&cookie.to_string()) { diff --git a/src/settings.rs b/src/settings.rs index 6f3803d..55bf5b9 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -78,11 +78,11 @@ pub async fn set(req: Request) -> Result