dependencies: Upgrade cookie and rename Servo's Cookie to ServoCookie (#32861)

This changes updates to the new version of the `cookie` crate in Servo
which no longer uses the old `time@0.1` data types. This requires using
a new version of `time` while we transition off of the old one. This is
the first step in that process.

In addition, the overloading of the `cookie::Cookie` name was causing a
great deal of confusion, so I've renamed the Servo wrapper to
`ServoCookie` like we do with `ServoUrl`.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2024-07-26 18:13:39 +02:00 committed by GitHub
parent 8f377a0cb1
commit b6f1e3b22d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 203 additions and 199 deletions

View file

@ -39,7 +39,7 @@ use url::Url;
use crate::async_runtime::HANDLE;
use crate::connector::{create_tls_config, CACertificates, TlsConfig};
use crate::cookie::Cookie;
use crate::cookie::ServoCookie;
use crate::fetch::methods::should_be_blocked_due_to_bad_port;
use crate::hosts::replace_host;
use crate::http_loader::HttpState;
@ -127,7 +127,7 @@ fn process_ws_response(
for cookie in response.headers().get_all(header::SET_COOKIE) {
if let Ok(s) = std::str::from_utf8(cookie.as_bytes()) {
if let Some(cookie) =
Cookie::from_cookie_string(s.into(), resource_url, CookieSource::HTTP)
ServoCookie::from_cookie_string(s.into(), resource_url, CookieSource::HTTP)
{
jar.push(cookie, resource_url, CookieSource::HTTP);
}