Skip to content

Commit 06b2e68

Browse files
committed
Copy username/password for relative URLs
Fixes web-platform-tests/wpt#1852. Fixes webspecs#25. Closes webspecs#22.
1 parent d92da18 commit 06b2e68

File tree

2 files changed

+138
-104
lines changed

2 files changed

+138
-104
lines changed

url.bs

+30-13
Original file line numberDiff line numberDiff line change
@@ -766,13 +766,13 @@ a <a lt='URL query'>query</a>.
766766

767767
<p>A <dfn id=concept-scheme-relative-url lt='scheme-relative URL'>scheme-relative URL</dfn> must be
768768
"<code>//</code>", optionally followed by
769-
<a lt='URL Userinfo'>userinfo</a> and "<code>@</code>",
769+
<a lt='URL userinfo'>userinfo</a> and "<code>@</code>",
770770
followed by a <a>host</a>, optionally followed
771771
by "<code>:</code>" and a <a lt='URL port'>port</a>,
772772
optionally followed by an
773773
<a>absolute-path-relative URL</a>.
774774

775-
<p><dfn id=concept-url-userinfo lt='URL Userinfo'>Userinfo</dfn> must be a
775+
<p><dfn id=concept-url-userinfo lt='URL userinfo'>Userinfo</dfn> must be a
776776
<a lt='URL username'>username</a>, optionally followed by a
777777
"<code>:</code>" and a
778778
<a lt='URL password'>password</a>.
@@ -1088,15 +1088,18 @@ optionally with an <a>encoding</a>
10881088

10891089
<dl class=switch>
10901090
<dt><a>EOF code point</a>
1091-
<dd>
1092-
<p>Set <var>url</var>'s <a lt='URL host'>host</a>
1093-
to <var>base</var>'s <a lt='URL host'>host</a>,
1094-
<var>url</var>'s <a lt='URL port'>port</a> to
1095-
<var>base</var>'s <a lt='URL port'>port</a>,
1096-
<var>url</var>'s <a lt='URL path'>path</a> to
1097-
<var>base</var>'s <a lt='URL path'>path</a>, and
1098-
<var>url</var>'s <a lt='URL query'>query</a> to
1099-
<var>base</var>'s <a lt='URL query'>query</a>.
1091+
<dd><p>Set <var>url</var>'s <a lt='URL username'>username</a> to
1092+
<var>base</var>'s <a lt='URL username'>username</a>,
1093+
<var>url</var>'s <a lt='URL password'>password</a> to
1094+
<var>base</var>'s <a lt='URL password'>password</a>,
1095+
<var>url</var>'s <a lt='URL host'>host</a>
1096+
to <var>base</var>'s <a lt='URL host'>host</a>,
1097+
<var>url</var>'s <a lt='URL port'>port</a> to
1098+
<var>base</var>'s <a lt='URL port'>port</a>,
1099+
<var>url</var>'s <a lt='URL path'>path</a> to
1100+
<var>base</var>'s <a lt='URL path'>path</a>, and
1101+
<var>url</var>'s <a lt='URL query'>query</a> to
1102+
<var>base</var>'s <a lt='URL query'>query</a>.
11001103

11011104
<dt>"<code>/</code>"
11021105
<dt>"<code>\</code>"
@@ -1109,7 +1112,10 @@ optionally with an <a>encoding</a>
11091112
</ol>
11101113

11111114
<dt>"<code>?</code>"
1112-
<dd><p>Set
1115+
<dd><p>Set <var>url</var>'s <a lt='URL username'>username</a> to
1116+
<var>base</var>'s <a lt='URL username'>username</a>,
1117+
<var>url</var>'s <a lt='URL password'>password</a> to
1118+
<var>base</var>'s <a lt='URL password'>password</a>,
11131119
<var>url</var>'s <a lt='URL host'>host</a> to
11141120
<var>base</var>'s <a lt='URL host'>host</a>,
11151121
<var>url</var>'s <a lt='URL port'>port</a> to
@@ -1120,7 +1126,10 @@ optionally with an <a>encoding</a>
11201126
and <var>state</var> to <a>query state</a>.
11211127

11221128
<dt>"<code>#</code>"
1123-
<dd><p>Set
1129+
<dd><p>Set <var>url</var>'s <a lt='URL username'>username</a> to
1130+
<var>base</var>'s <a lt='URL username'>username</a>,
1131+
<var>url</var>'s <a lt='URL password'>password</a> to
1132+
<var>base</var>'s <a lt='URL password'>password</a>,
11241133
<var>url</var>'s <a lt='URL host'>host</a> to
11251134
<var>base</var>'s <a lt='URL host'>host</a>,
11261135
<var>url</var>'s <a lt='URL port'>port</a> to
@@ -1143,6 +1152,10 @@ optionally with an <a>encoding</a>
11431152
consists of one code point, or <a>remaining</a>'s second code point is
11441153
not one of "<code>/</code>", "<code>\</code>", "<code>?</code>",
11451154
and "<code>#</code>", then set
1155+
<var>url</var>'s <a lt='URL username'>username</a> to
1156+
<var>base</var>'s <a lt='URL username'>username</a>,
1157+
<var>url</var>'s <a lt='URL password'>password</a> to
1158+
<var>base</var>'s <a lt='URL password'>password</a>,
11461159
<var>url</var>'s <a lt='URL host'>host</a> to
11471160
<var>base</var>'s <a lt='URL host'>host</a>,
11481161
<var>url</var>'s <a lt='URL port'>port</a> to
@@ -1186,6 +1199,10 @@ optionally with an <a>encoding</a>
11861199
<li>
11871200
<p>If <var>url</var>'s <a lt='URL scheme'>scheme</a> is not
11881201
"<code>file</code>", set
1202+
<var>url</var>'s <a lt='URL username'>username</a> to
1203+
<var>base</var>'s <a lt='URL username'>username</a>,
1204+
<var>url</var>'s <a lt='URL password'>password</a> to
1205+
<var>base</var>'s <a lt='URL password'>password</a>,
11891206
<var>url</var>'s <a lt='URL host'>host</a> to
11901207
<var>base</var>'s <a lt='URL host'>host</a> and
11911208
<var>url</var>'s <a lt='URL port'>port</a> to

0 commit comments

Comments
 (0)