Update 'cookie' to 0.13, 'rustls' to 0.16.

This commit is contained in:
Sergio Benitez 2020-01-21 16:09:15 -08:00
parent 31712018bb
commit 7c1b8dc9ad
4 changed files with 7 additions and 7 deletions

View File

@ -23,16 +23,16 @@ private-cookies = ["cookie/secure"]
smallvec = "1.0"
percent-encoding = "1"
hyper = { version = "0.10.13", default-features = false }
time = "0.1"
time = "0.2.4"
indexmap = "1.0"
rustls = { version = "0.15", optional = true }
rustls = { version = "0.16", optional = true }
state = "0.4"
cookie = { version = "0.12", features = ["percent-encode"] }
cookie = { version = "0.13", features = ["percent-encode"] }
pear = "0.1"
unicode-xid = "0.2"
[dependencies.hyper-sync-rustls]
version = "=0.3.0-rc.5"
version = "=0.3.0-rc.6"
features = ["server"]
optional = true

View File

@ -362,7 +362,7 @@ impl Cookies<'_> {
}
if cookie.expires().is_none() {
cookie.set_expires(time::now() + time::Duration::weeks(1));
cookie.set_expires(time::OffsetDateTime::now() + time::Duration::weeks(1));
}
if cookie.same_site().is_none() {

View File

@ -31,7 +31,7 @@ log = "0.4"
toml = "0.4.7"
num_cpus = "1.0"
state = "0.4.1"
time = "0.1"
time = "0.2.4"
memchr = "2" # TODO: Use pear instead.
base64 = "0.11"
base16 = "0.2"

View File

@ -414,7 +414,7 @@ impl<'c> LocalRequest<'c> {
// with the changes reflected by `response`.
if let Some(ref jar) = client.cookies {
let mut jar = jar.write().expect("LocalRequest::_dispatch() write lock");
let current_time = time::now();
let current_time = time::OffsetDateTime::now();
for cookie in response.cookies() {
if let Some(expires) = cookie.expires() {
if expires <= current_time {