Skip to content

Commit

Permalink
Update url.bs
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Jan 17, 2023
1 parent 94032c4 commit f63ed02
Showing 1 changed file with 20 additions and 30 deletions.
50 changes: 20 additions & 30 deletions url.bs
Original file line number Diff line number Diff line change
Expand Up @@ -223,22 +223,6 @@ let url = new URL("/c:/path/to/file", "file:///c:/");</code></pre>
<p>The file URL's host is a Windows drive letter.
<p class=example id=example-unexpected-windows-drive-letter-host>"<code>file://c:</code>"
<td>
<tr>
<td><dfn>unexpected-host-file-scheme</dfn>
<td>
<p>The URL's <a for=url>scheme</a> is changed to "<code>file</code>" and the existing URL has a
<a for=url>host</a>.
<pre class=example id=example-unexpected-host-file-scheme><code class=lang-javascript>
const url = new URL("https://example.org");
url.protocol = "file";</code></pre>
<td>
<tr>
<td><dfn>unexpected-empty-path</dfn>
<td>
<p>The URL's <a for=url>scheme</a> is "<code>file</code>" and it contains an empty
<a for=url>path</a> segment.
<p class=example id=example-unexpected-empty-path>"<code>file:///c:/path//to/file</code>"
<td>
<tr>
<td><dfn>invalid-URL-code-point</dfn>
<td>
Expand All @@ -260,7 +244,7 @@ url.protocol = "file";</code></pre>
<p class=example id=example-unclosed-ipv6-address>"<code>https://[::1</code>"
<td>
<tr>
<td><dfn>domain-to-ASCII-failure</dfn>
<td><dfn id=validation-error-domain-to-ascii>domain-to-ASCII</dfn>
<td>
<p>The result of <a abstract-op lt=ToASCII>Unicode toASCII</a> records an error while processing
the input domain.
Expand All @@ -269,16 +253,23 @@ url.protocol = "file";</code></pre>
are encouraged pass those codes along.
<td>
<tr>
<td><dfn>domain-to-ASCII-empty-domain-failure</dfn>
<td><dfn>domain-to-ASCII-empty</dfn>
<td>
<p>The result of <a abstract-op lt=ToASCII>Unicode toASCII</a> returns an empty string. This can
be caused by a number of things, such as:
<p>The result of <a abstract-op lt=ToASCII>Unicode toASCII</a> returns an empty string. This
could have been caused by:
<ul>
<li>Input consists of all ignorable code points.
<li>Input is the string "<code>xn--</code>".
<li>Input is the empty string and the <i>VerifyDnsLength</i> option is set to false.
<li>Input is the empty string and the <i>VerifyDnsLength</i> parameter is false.
</ul>
<td>
<tr>
<td><dfn>domain-to-Unicode</dfn>
<td>
<p>The result of <a abstract-op lt=ToUnicode>Unicode toUnicode</a> returns an error while
processing the input domain.
<p class=note>The same considerations as with <a>domain-to-ASCII</a> apply.
<td>
<tr>
<td><dfn id=validation-error-forbidden-domain-code-point>forbidden-domain-code-point</dfn>
<td>
Expand Down Expand Up @@ -947,10 +938,10 @@ concepts.
<a for=list>item</a> that <a for=string>starts with</a> an <a>ASCII case-insensitive</a> match for
"<code>xn--</code>", this step is equivalent to <a>ASCII lowercasing</a> <var>domain</var>.

<li><p>If <var>result</var> is a failure value, <a>domain-to-ASCII-failure</a>
<a>validation error</a>, return failure.
<li><p>If <var>result</var> is a failure value, <a>domain-to-ASCII</a> <a>validation error</a>,
return failure.

<li><p>If <var>result</var> is the empty string, <a>domain-to-ASCII-empty-domain-failure</a>
<li><p>If <var>result</var> is the empty string, <a>domain-to-ASCII-empty</a>
<a>validation error</a>, return failure.

<li><p>Return <var>result</var>.
Expand All @@ -970,8 +961,8 @@ concepts.
<i>UseSTD3ASCIIRules</i> set to <var>beStrict</var>, and <i>Transitional_Processing</i> set to
false. [[!UTS46]]

<li><p>Signify <a>validation errors</a> for any returned errors, and then, return
<var>result</var>.
<li><p>Signify <a>domain-to-Unicode</a> <a>validation errors</a> for any returned errors, and then,
return <var>result</var>.
</ol>


Expand Down Expand Up @@ -1060,8 +1051,7 @@ to be distinguished.
<li><p>Let <var>asciiDomain</var> be the result of running <a>domain to ASCII</a> with
<var>domain</var> and false.

<li><p>If <var>asciiDomain</var> is failure, <a>domain-to-ASCII-failure</a>
<a>validation error</a>, return failure.
<li><p>If <var>asciiDomain</var> is failure, then return failure.

<li><p>If <var>asciiDomain</var> contains a <a>forbidden domain code point</a>,
<a>forbidden-domain-code-point</a> <a>validation error</a>, return failure.
Expand Down Expand Up @@ -2527,7 +2517,7 @@ and then runs these steps:

<li><p>Otherwise, if <var>state override</var> is given, <var>buffer</var> is the empty
string, and either <var>url</var> <a>includes credentials</a> or <var>url</var>'s
<a for=url>port</a> is non-null, <a>host-invalid</a> <a>validation error</a> return.
<a for=url>port</a> is non-null, <a>host-invalid</a> <a>validation error</a>, return.

<li><p>Let <var>host</var> be the result of <a>host parsing</a> <var>buffer</var> with
<var>url</var> <a>is not special</a>.
Expand Down Expand Up @@ -2643,7 +2633,7 @@ and then runs these steps:
<p>Otherwise:

<ol>
<li><p><a>unexpected-Windows-drive-letter</a> <a>validation error</a>.
<li><p><a>Unexpected-Windows-drive-letter</a> <a>validation error</a>.

<li><p>Set <var>url</var>'s <a for=url>path</a> to an empty list.
</ol>
Expand Down

0 comments on commit f63ed02

Please sign in to comment.