diff --git a/url.bs b/url.bs index d8037194..c0498f1b 100644 --- a/url.bs +++ b/url.bs @@ -365,9 +365,9 @@ context to be distinguished.

Host parsing

-

The host parser takes a string input and -an optional Unicode flag (unset unless stated otherwise), and then runs these -steps: +

The host parser takes a string input, a boolean +isSpecial, and an optional Unicode flag (unset unless stated otherwise), and +then runs these steps:

  1. @@ -384,6 +384,9 @@ steps: "]" removed.
+
  • If isSpecial is false, then return the result of + opaque-host parsing input. +

  • Let domain be the result of running UTF-8 decode without BOM on the percent decoding of UTF-8 encode on input. @@ -454,8 +457,10 @@ The IPv4 number parser takes a string input and a -The IPv4 parser takes a string input and then -runs these steps: +


    + +

    The IPv4 parser takes a string input and then runs +these steps:

    1. Let syntaxViolationFlag be unset. @@ -526,6 +531,8 @@ runs these steps:

    2. Return ipv4.

    +
    +

    The IPv6 parser takes a string input and then runs these steps: @@ -707,6 +714,23 @@ then runs these steps: IPv4, and Finale are markers. They serve no purpose other than being a location the algorithm can jump to. +


    + +

    The opaque-host parser takes a string +input, and then runs these steps: + +

      +
    1. If input contains a forbidden host code point excluding "%", + syntax violation, return failure. + +

    2. Let output be the empty string. + +

    3. For each code point in input, UTF-8 percent encode it using the + simple encode set, and append the result to output. + +

    4. Return output. +

    +

    Host serializing

    @@ -1244,26 +1268,6 @@ different document encoding. Using the UTF-8 encoding everywhere solves t
    -

    The URL-host parser takes a string input -and a boolean isSpecial, and then runs these steps:

    - -
      -
    1. If isSpecial is true, then return the result of - host parsing input. - -

    2. If input contains a forbidden host code point, syntax violation, - return failure. - -

    3. Let output be the empty string. - -

    4. For each code point in input, UTF-8 percent encode it using the - simple encode set, and append the result to output. - -

    5. Return output. -

    - -
    -

    The basic URL parser takes a string input, optionally with a base URL base, optionally with an encoding encoding override, optionally with a URL @@ -1651,7 +1655,7 @@ string input, optionally with a base URL base, opti

  • If buffer is the empty string, syntax violation, return failure. -

  • Let host be the result of URL-host parsing +

  • Let host be the result of host parsing buffer with url is special.

  • If host is failure, then return failure. @@ -1685,7 +1689,7 @@ string input, optionally with a base URL base, opti string, and either url includes credentials or url's port is non-null, syntax violation, return. -

  • Let host be the result of URL-host parsing +

  • Let host be the result of host parsing buffer with url is special.

  • If host is failure, then return failure. @@ -1891,7 +1895,7 @@ string input, optionally with a base URL base, opti

    1. Let host be the result of host parsing - buffer. + buffer with url is special.

    2. If host is failure, then return failure.