- From: Anne van Kesteren <notifications@github.com>
- Date: Fri, 24 Feb 2017 05:20:14 -0800
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/url/pull/260/review/23710838@github.com>
annevk requested changes on this pull request.
Looks good overall, but many nits.
> <dd><p>a <a>path-absolute-non-Windows-file-URL string</a> if <a>base URL</a>'s <a for=url>host</a>
- is non-null
+ is non-empty string
It's not always a string though. It could be an IPv4 address.
> @@ -254,7 +254,7 @@ point <a for=/>URLs</a> from <var>A</var> can come from untrusted sources.
<h3 id=host-representation>Host representation</h3>
<p>A <dfn export id=concept-host>host</dfn> is a <a>domain</a>, an
-<a>IPv4 address</a>, an <a>IPv6 address</a>, or an <a>opaque host</a>. Typically a <a for=/>host</a>
+<a>IPv4 address</a>, an <a>IPv6 address</a>, an <a>opaque host</a>, or an <a>empty host</a>. Typically a <a for=/>host</a>
This doesn't meet the 100 column wrapping requirements.
> @@ -280,12 +280,14 @@ eight <dfn id=concept-ipv6-piece lt='IPv6 piece'>16-bit pieces</dfn>.
<p class="note">Support for <code><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
+<p>An <dfn export>opaque host</dfn> is a non-empty <a>ASCII string</a> holding data that can be used for
Same here, I think.
> @@ -768,7 +770,7 @@ no purpose other than being a location the algorithm can jump to.
<a>IPv6 serializer</a> on <var>host</var>,
followed by "<code>]</code>".
- <li><p>Otherwise, <var>host</var> is a <a>domain</a> or <a>opaque host</a>, return <var>host</var>.
+ <li><p>Otherwise, <var>host</var> is a <a>domain</a>, an <a>opaque host</a>, or an <a>empty host</a>, return <var>host</var>.
And here.
> @@ -1172,9 +1174,9 @@ switching on <a>base URL</a>'s <a for=url>scheme</a>:
<dd><p>a <a>path-relative-scheme-less-URL string</a>
<dt>"<code>file</code>"
<dd><p>a <a>scheme-relative-file-URL string</a>
- <dd><p>a <a>path-absolute-URL string</a> if <a>base URL</a>'s <a for=url>host</a> is null
+ <dd><p>a <a>path-absolute-URL string</a> if <a>base URL</a>'s <a for=url>host</a> is either null or the empty string
This should say "an empty host" I think. A base URL is a URL record after all. But also, I thought the idea was that for file URLs the host could never be null so then we should leave that out too.
> <dd><p>a <a>path-absolute-non-Windows-file-URL string</a> if <a>base URL</a>'s <a for=url>host</a>
- is non-null
+ is non-empty string
This should probably just say not an empty host.
> @@ -1199,7 +1201,7 @@ optionally followed by a <a>path-absolute-URL string</a>.
<a>path-absolute-URL string</a>.
<p>An <dfn export>opaque-host-and-port string</dfn> must be either an empty
-<a>valid opaque-host string</a> or: a non-empty <a>valid opaque-host string</a>, optionally followed
+string or: a <a>valid opaque-host string</a>, optionally followed
It's "the empty string" (and an empty host).
> @@ -2066,10 +2068,10 @@ string <var>input</var>, optionally with a <a>base URL</a> <var>base</var>, opti
<a>Windows drive letter</a>, then:
<ol>
- <li><p>If <var>url</var>'s <a for=url>host</a> is non-null,
+ <li><p>If <var>url</var>'s <a for=url>host</a> is not the empty string,
Here again we're talking about a URL record so we should say "not an empty host". Same below.
--
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-23710838
Received on Friday, 24 February 2017 13:21:41 UTC