mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
script: Do not include fragments when comparing URLs in CookieStore
(#38876)
Fixes a check for empty options in `getAll(options)` and makes url comparison with exclude fragments set to true. Testing: New passing WPT tests Part of #37674 --------- Signed-off-by: Sebastian C <sebsebmc@gmail.com>
This commit is contained in:
parent
84f478a47a
commit
e5c83ec419
14 changed files with 46 additions and 66 deletions
|
@ -117,6 +117,13 @@ impl ServoUrl {
|
|||
scheme == "wss"
|
||||
}
|
||||
|
||||
/// <https://url.spec.whatwg.org/#url-equivalence>
|
||||
/// In the future this may be removed if the helper is added upstream in rust-url
|
||||
/// see <https://github.com/servo/rust-url/issues/1063> for details
|
||||
pub fn is_equal_excluding_fragments(&self, other: &ServoUrl) -> bool {
|
||||
self.0[..Position::AfterQuery] == other.0[..Position::AfterQuery]
|
||||
}
|
||||
|
||||
pub fn as_str(&self) -> &str {
|
||||
self.0.as_str()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue