From 1c3e6ed5995938fb082e50dcc4fccef1b7413bd4 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 25 Mar 2024 16:30:49 +0100 Subject: [PATCH] Editorial: adopt
throughout --- url.bs | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 85 insertions(+), 5 deletions(-) diff --git a/url.bs b/url.bs index fe2f9f3..3c08d5d 100644 --- a/url.bs +++ b/url.bs @@ -555,7 +555,6 @@ encoding U+0025 (%) and thus give “roundtripable data”: component percent U+0025 (%) untouched and as such it needs to be percent-encoded first in order to be properly represented. -
@@ -898,6 +897,7 @@ concepts.

IDNA

+

The domain to ASCII algorithm, given a string domain and a boolean beStrict, runs these steps: @@ -926,7 +926,9 @@ concepts.

This document and the web platform at large use Unicode IDNA Compatibility Processing and not IDNA2008. For instance, ☕.example becomes xn--53h.example and not failure. [[UTS46]] [[RFC5890]] +

+

The domain to Unicode algorithm, given a domain domain and a boolean beStrict, runs these steps: @@ -940,6 +942,7 @@ concepts.

  • Signify domain-to-Unicode validation errors for any returned errors, and then, return result. +

  • Host writing

    @@ -1392,6 +1395,7 @@ actually doing that with the editors of this document first.

    Host serializing

    +

    The host serializer takes a host host and then runs these steps. They return an ASCII string. @@ -1405,8 +1409,10 @@ actually doing that with the editors of this document first.

  • Otherwise, host is a domain, opaque host, or empty host, return host. +

  • -The IPv4 serializer takes an IPv4 address +
    +

    The IPv4 serializer takes an IPv4 address address and then runs these steps. They return an ASCII string.

      @@ -1428,7 +1434,9 @@ The IPv4 serializer takes an IPv4 addre
    1. Return output.

    +
    +

    The IPv6 serializer takes an IPv6 address address and then runs these steps. They return an ASCII string. @@ -1480,16 +1488,16 @@ The IPv4 serializer takes an IPv4 addre

    This algorithm requires the recommendation from A Recommendation for IPv6 Address Text Representation. [[RFC5952]] - - +

    Host equivalence

    +

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

    Certificate comparison requires a host equivalence check that ignores the trailing dot of a domain (if any). However, those hosts have also various other facets @@ -1878,6 +1886,7 @@ if all of the following are true:

    +

    To shorten a url's path:

      @@ -1891,6 +1900,7 @@ if all of the following are true:
    1. Remove path's last item, if any.

    +

    URL writing

    @@ -2075,6 +2085,7 @@ different document encoding. Using the UTF-8 encoding everywhere solves t

    URL parsing

    +

    The URL parser takes a scalar value string input, with an optional null or base URL base (default null) and an optional encoding encoding (default @@ -2101,9 +2112,11 @@ different document encoding. Using the UTF-8 encoding everywhere solves t

  • Return url. +


  • +

    The basic URL parser takes a scalar value string input, with an optional null or base URL base (default null), an optional encoding encoding (default @@ -2949,22 +2962,28 @@ and then runs these steps:

  • Return url. +


  • +

    To set the username given a url and username, set url's username to the result of running UTF-8 percent-encode on username using the userinfo percent-encode set. +

    +

    To set the password given a url and password, set url's password to the result of running UTF-8 percent-encode on password using the userinfo percent-encode set. +

    URL serializing

    +

    The URL serializer takes a URL url, with an optional boolean exclude fragment (default false), and then runs @@ -3023,7 +3042,9 @@ these steps. They return an ASCII string.

  • Return output. +

  • +

    The URL path serializer takes a URL url and then runs these steps. They return an ASCII string. @@ -3038,10 +3059,12 @@ these steps. They return an ASCII string.

  • Return output. +

  • URL equivalence

    +

    To determine whether a URL A equals URL B, with an optional boolean exclude fragments (default false), @@ -3058,6 +3081,7 @@ run these steps:

  • Return true if serializedA is serializedB; otherwise false. +

  • Origin

    @@ -3066,6 +3090,7 @@ run these steps:

    See origin's definition in HTML for the necessary background information. [[HTML]] +

    The origin of a URL url is the origin returned by running these steps, switching on url's scheme: @@ -3114,6 +3139,7 @@ is the origin returned by running these steps, switching on ur

    This does indeed mean that these URLs cannot be same origin with themselves. +

    URL rendering

    @@ -3218,6 +3244,7 @@ the format is in widespread use due to the prevalence of HTML forms. [[HTML]] other than UTF-8 as well as have special logic for tuples of which the name is `_charset`. Such logic is not described here as only UTF-8 is conforming. +

    The application/x-www-form-urlencoded parser takes a byte sequence input, and then runs these steps: @@ -3260,10 +3287,12 @@ takes a byte sequence input, and then runs these steps:

  • Return output. +

  • application/x-www-form-urlencoded serializing

    +

    The application/x-www-form-urlencoded serializer takes a list of name-value tuples tuples, with an optional encoding @@ -3301,6 +3330,7 @@ takes a list of name-value tuples tuples, with an optional e

  • Return output. +
  • Hooks

    @@ -3355,6 +3385,7 @@ interface URL { object. +

    To potentially strip trailing spaces from an opaque path given a {{URL}} object url: @@ -3369,7 +3400,9 @@ interface URL {

  • Remove all trailing U+0020 SPACE code points from url's URL's path. +

  • +

    The API URL parser takes a scalar value string url and an optional null-or-scalar value string base (default null), and then runs these steps: @@ -3389,6 +3422,7 @@ null-or-scalar value string base (default null), and then runs

  • Return the result of running the basic URL parser on url with parsedBase. +

  • To initialize a {{URL}} object url with a URL @@ -3480,6 +3514,7 @@ steps are:

    +

    The static canParse(url, base) method steps are: @@ -3491,13 +3526,17 @@ method steps are:

  • Return true. +


  • +

    The href getter steps and the toJSON() method steps are to return the serialization of this's URL. +

    +

    The href setter steps are:

      @@ -3516,22 +3555,32 @@ method steps are: query object's list to the result of parsing query.
    +
    +

    The origin getter steps are to return the serialization of this's URL's origin. [[!HTML]] +

    +

    The protocol getter steps are to return this's URL's scheme, followed by U+003A (:). +

    +

    The protocol setter steps are to basic URL parse the given value, followed by U+003A (:), with this's URL as url and scheme start state as state override. +

    +

    The username getter steps are to return this's URL's username. +

    +

    The username setter steps are:

      @@ -3540,10 +3589,14 @@ method steps are:
    1. Set the username given this's URL and the given value.

    +
    +

    The password getter steps are to return this's URL's password. +

    +

    The password setter steps are:

      @@ -3552,7 +3605,9 @@ method steps are:
    1. Set the password given this's URL and the given value.

    +
    +

    The host getter steps are:

      @@ -3567,7 +3622,9 @@ method steps are: followed by U+003A (:) and url's port, serialized.
    +
    +

    The host setter steps are:

      @@ -3582,7 +3639,9 @@ method steps are: port, this's URL's port will not change. This can be unexpected as host getter does return a URL-port string so one might have assumed the setter to always "reset" both. +
    +

    The hostname getter steps are:

      @@ -3592,7 +3651,9 @@ one might have assumed the setter to always "reset" both.
    1. Return this's URL's host, serialized.

    +
    +

    The hostname setter steps are:

      @@ -3602,7 +3663,9 @@ one might have assumed the setter to always "reset" both. URL as url and hostname state as state override.
    +
    +

    The port getter steps are:

      @@ -3612,7 +3675,9 @@ one might have assumed the setter to always "reset" both.
    1. Return this's URL's port, serialized.

    +
    +

    The port setter steps are:

      @@ -3626,10 +3691,14 @@ one might have assumed the setter to always "reset" both. this's URL as url and port state as state override.
    +
    +

    The pathname getter steps are to return the result of URL path serializing this's URL. +

    +

    The pathname setter steps are:

      @@ -3641,7 +3710,9 @@ one might have assumed the setter to always "reset" both. URL as url and path start state as state override.
    +
    +

    The search getter steps are:

      @@ -3650,7 +3721,9 @@ one might have assumed the setter to always "reset" both.
    1. Return U+003F (?), followed by this's URL's query.

    +
    +

    The search setter steps are:

      @@ -3686,10 +3759,14 @@ one might have assumed the setter to always "reset" both. code points from this's URL's path. It does this so that running the URL parser on the output of running the URL serializer on this's URL does not yield a URL that is not equal. +
    +

    The searchParams getter steps are to return this's query object. +

    +

    The hash getter steps are:

      @@ -3698,7 +3775,9 @@ so that running the URL parser on the output of running the URL serial
    1. Return U+0023 (#), followed by this's URL's fragment.

    +
    +

    The hash setter steps are:

      @@ -3724,6 +3803,7 @@ so that running the URL parser on the output of running the URL serial

      The {{URL/hash}} setter has the potential to change this's URL's path in a manner equivalent to the {{URL/search}} setter. +

    URLSearchParams class