From 21268c34989f74a32a432b1e0632e61359287f65 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Sun, 4 Oct 2026 16:22:12 +0200 Subject: [PATCH] Use Infra's equality for hosts, URLs, and URL paths Follows https://github.com/whatwg/infra/pull/710. --- url.bs | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/url.bs b/url.bs index 76109441..648d9aeb 100644 --- a/url.bs +++ b/url.bs @@ -1648,7 +1648,7 @@ A Recommendation for IPv6 Address Text Representation.

To determine whether a host A equals host B, -return true if A is B, and false otherwise. +return true if A and B are equal; otherwise false.

Certificate comparison requires a host equivalence check that ignores the @@ -1813,6 +1813,9 @@ unified model would be, please file an issue. represents a universal identifier. To disambiguate from a valid URL string it can also be referred to as a URL record. +

A URL's equality, given URLs A and B, +returns true if A equals B; otherwise false. +

A URL's scheme is an ASCII string that identifies the type of URL and can be used to dispatch a URL for further processing after parsing. @@ -3269,21 +3272,8 @@ run these steps:

To determine whether a URL path A -equals URL path B, run these -steps. They return a boolean. - -

    -
  1. If A is a URL path segment or B is a - URL path segment, then return whether A is B. - -

  2. If A's size is not B's size, then - return false. - -

  3. For each index of A's indices: if - A[index] is not B[index], then return false. - -

  4. Return true. -

+equals URL path B, return true +if A and B are equal; otherwise false.

Comparing URL path segments rather than serializations can matter as distinct URL paths can serialize identically. E.g.,