diff options
Diffstat (limited to 'components/net/cookie.rs')
-rw-r--r-- | components/net/cookie.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/net/cookie.rs b/components/net/cookie.rs index 28972d95806..768017ec6f6 100644 --- a/components/net/cookie.rs +++ b/components/net/cookie.rs @@ -8,10 +8,10 @@ use cookie_rs; use net_traits::CookieSource; use net_traits::pub_domains::is_pub_domain; +use servo_url::ServoUrl; use std::borrow::ToOwned; use std::net::{Ipv4Addr, Ipv6Addr}; use time::{Tm, now, at, Duration}; -use url::Url; /// A stored cookie that wraps the definition in cookie-rs. This is used to implement /// various behaviours defined in the spec that rely on an associated request URL, @@ -28,7 +28,7 @@ pub struct Cookie { impl Cookie { /// http://tools.ietf.org/html/rfc6265#section-5.3 - pub fn new_wrapped(mut cookie: cookie_rs::Cookie, request: &Url, source: CookieSource) + pub fn new_wrapped(mut cookie: cookie_rs::Cookie, request: &ServoUrl, source: CookieSource) -> Option<Cookie> { // Step 3 let (persistent, expiry_time) = match (&cookie.max_age, &cookie.expires) { @@ -145,7 +145,7 @@ impl Cookie { } // http://tools.ietf.org/html/rfc6265#section-5.4 step 1 - pub fn appropriate_for_url(&self, url: &Url, source: CookieSource) -> bool { + pub fn appropriate_for_url(&self, url: &ServoUrl, source: CookieSource) -> bool { let domain = url.host_str(); if self.host_only { if self.cookie.domain.as_ref().map(String::as_str) != domain { |