diff --git a/url.bs b/url.bs index 751bb453..7d6ed2dd 100644 --- a/url.bs +++ b/url.bs @@ -847,6 +847,9 @@ null or a 16-bit unsigned integer that identifies a networking port. It is initi ASCII strings holding data, usually identifying a location in hierarchical form. It is initially the empty list. +
A special URL always has a +non-empty path. +
A URL's query is either null or an ASCII string holding data. It is initially null. @@ -1522,8 +1525,8 @@ string input, optionally with a base URL base, opti
If either c is "/
", or url is special and
- c is "\
", run these substeps:
+
If url is special and c is "/
" or "\
",
+ then:
If c is "\
", syntax violation.
@@ -1531,6 +1534,9 @@ string input, optionally with a base URL base, opti
Set state to special authority ignore slashes state.
Otherwise, if c is "/
", then set state to
+ authority state.
+
Otherwise, set url's username to base's username, @@ -1887,12 +1893,29 @@ string input, optionally with a base URL base, opti
If url is special and c is "\
",
- syntax violation.
+
If url is special, then: + +
If c is "\
", syntax violation.
-
Set state to path state, and if neither c is
- "/
", nor url is special and c is
- "\
", decrease pointer by one.
+
Set state to path state. + +
If c is neither "/
" nor "\
", then decrease
+ pointer by one.
+
Otherwise, if state override is not given and c is "?
",
+ then set url's query to the empty string and state to
+ query state.
+
+
Otherwise, if state override is not given and c is "#
",
+ then set url's fragment to the empty string and state to
+ fragment state.
+
+
Otherwise, if c is not EOF code point, then: set state to
+ path state and if c is not "/
", then decrease pointer by
+ one.
If url's cannot-be-a-base-URL flag is set, append the first string in url's path to output. -
Otherwise, append "/
", followed by the strings in url's
- path (including empty strings), if any, separated from each other by
- "/
", to output.
+
Otherwise, then for each string in url's path,
+ append "/
" followed by the string to output.
If url's query is non-null, append
"?
", followed by url's query, to
@@ -2702,6 +2724,9 @@ the setter to always "reset" both.
If context object's url's cannot-be-a-base-URL flag is set, then return context object's url's path[0]. +
If context object's url's path + is empty, then return the empty string. +
Return "/
", followed by the strings in context object's
url's path (including empty strings), if any, separated from each
other by "/
".