aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/cookie.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/cookie.rs')
-rw-r--r--components/net/cookie.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/net/cookie.rs b/components/net/cookie.rs
index 67e95661c77..c0f6b1645f6 100644
--- a/components/net/cookie.rs
+++ b/components/net/cookie.rs
@@ -115,7 +115,7 @@ impl Cookie {
pub fn path_match(request_path: &str, cookie_path: &str) -> bool {
request_path == cookie_path ||
( request_path.starts_with(cookie_path) &&
- ( request_path.ends_with("/") || request_path.as_bytes()[cookie_path.len() - 1] == b'/' )
+ ( request_path.ends_with("/") || request_path[cookie_path.len()..].starts_with("/"))
)
}