Re: [whatwg/url] Use empty host for file URL's (#260)

annevk commented on this pull request.

Couple nits left. I'll also push a commit to adjust the formatting of the table a bit.

> @@ -280,12 +280,14 @@ eight <dfn id=concept-ipv6-piece lt='IPv6 piece'>16-bit pieces</dfn>.
 <p class="note">Support for <code>&lt;zone_id></code> is
 <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27234#c2">intentionally omitted</a>.
 
-<p>An <dfn export>opaque host</dfn> is an <a>ASCII string</a> holding data that can be used for
-further processing.
+<p>An <dfn export>opaque host</dfn> is a non-empty <a>ASCII string</a> holding data that can be used
+for further processing.
 
 <p class="note no-backref">An <a>opaque host</a> is only used by <a lt="is special">non-special</a>
 <a for=/>URLs</a>.

I think either we should have a note like this for empty hosts too or we should drop this one, no?

> @@ -1002,6 +1005,25 @@ It is initially the empty string.
 <p>A <a for=/>URL</a>'s <dfn export for=url id=concept-url-host>host</dfn> is null or a
 <a for=/>host</a>. It is initially null.
 
+<div class="note">
+ <p>The following table lists allowed <a for=/>URL</a>'s <a for=url>scheme</a> /
+ <a for=url>host</a> combinations.
+
+ <table>
+  <tr><th rowspan="2"><a for=/>URL</a>'s <a for=url>scheme</a>
+      <th colspan="6"><a for=/>URL</a>'s <a for=url>host</a>
+  <tr><th><a>domain</a>
+      <th><a>IPv4 address</a>
+      <th><a>IPv6 address</a>
+      <th><a>opaque host</a>
+      <th><a>empty host</a>
+      <th>null
+  <tr><td>non-file <a lt="special scheme">special</a><td>✅<td>✅<td>✅<td><td><td>

`non-"<code>file</code>"`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/260#pullrequestreview-25215510

Received on Monday, 6 March 2017 10:24:59 UTC