diff --git a/url.bs b/url.bs index de68c188..47aeb5a8 100644 --- a/url.bs +++ b/url.bs @@ -1716,12 +1716,16 @@ string input, optionally with a base URL base, opti
  1. Set url's scheme to base's scheme. +

  2. If c is U+002F (/), then set state to relative slash state. + +

  3. Otherwise, if url is special and c is U+005C (\), + validation error, set state to relative slash state. +

  4. -

    Switch on c: +

    Otherwise: -

    -
    The EOF code point -

    Set url's username to +

      +
    1. Set url's username to base's username, url's password to base's password, @@ -1734,62 +1738,23 @@ string input, optionally with a base URL base, opti url's query to base's query. -

      U+002F (/) -

      Set state to relative slash state. - -

      U+003F (?) -

      Set url's username to - base's username, - url's password to - base's password, - url's host to - base's host, - url's port to - base's port, - url's path to a clone of - base's path, - url's query to the empty string, and - state to query state. - -

      U+0023 (#) -

      Set url's username to - base's username, - url's password to - base's password, - url's host to - base's host, - url's port to - base's port, - url's path to a clone of - base's path, - url's query to - base's query, - url's fragment to the empty string, and - state to fragment state. +

    2. If c is U+003F (?), then set url's query to the empty + string, and state to query state. -

      Otherwise -
      -

      If url is special and c is U+005C (\), validation error, - set state to relative slash state. +

    3. Otherwise, if c is U+0023 (#), set url's fragment to + the empty string and state to fragment state. -

      Otherwise, run these steps: +

    4. +

      Otherwise, if c is not the EOF code point:

        -
      1. Set url's username to - base's username, - url's password to - base's password, - url's host to - base's host, - url's port to - base's port, - url's path to a clone of - base's path, and then remove - url's path's last item, if any. +

      2. Set url's query to null. + +

      3. Remove url's path's last item, if any.

      4. Set state to path state and decrease pointer by 1.

      -
    +
relative slash state