Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify output of PSL is in A-Labels #484

Merged
merged 4 commits into from
Apr 28, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions url.bs
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,13 @@ U+005C (\), or U+005D (]).
<ol>
<li><p>If <var>host</var> is not a <a>domain</a>, then return null.

<li><p>Return the <a for=host>public suffix</a> obtained by executing the
<a href="https://publicsuffix.org/list/">algorithm</a> defined by the Public Suffix List on
<var>host</var>. [[!PSL]].
<li><p>Let <var>publicSuffix</var> be the public suffix determined by running the
<a href="https://publicsuffix.org/list/">Public Suffix List algorithm</a> with <var>host</var> as
domain. [[!PSL]]

<li><p>Assert: <var>publicSuffix</var> is encoded using A-Labels. [[!UTS46]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UTS 46 doesn't really define what an A-label is, as it only seeks to define a replacement for the processing algorithm. In fact, it defers the definition to RFC 5890 and doesn't use the word at all itself.

Additionally, the term "A-label" exclusively refers to validly encoded labels with xn-- prefix. To refer to all ASCII-encoded labels, it may be better to use either of the following:

Assert: publicSuffix contains only ASCII characters.

or

Assert: Labels in publicSuffix must be either A-labels or NR-LDH labels. [RFC5890]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to use UTS46 as an intermediary, but as A-Label doesn't work and NR-LDH isn't mentioned there we'll just assert ASCII code points.


<li><p>Return <var>publicSuffix</var>.
</ol>

<p>A <a for=/>host</a>'s <dfn for=host export>registrable domain</dfn> is a <a>domain</a> formed by
Expand All @@ -297,9 +301,13 @@ obtain <var>host</var>'s <a for=host>registrable domain</a>, run these steps:
<li><p>If <var>host</var>'s <a for=host>public suffix</a> is null or <var>host</var>'s
<a for=host>public suffix</a> <a for=host>equals</a> <var>host</var>, then return null.

<li><p>Return the <a for=host>registrable domain</a> obtained by executing the
<a href="https://publicsuffix.org/list/">algorithm</a> defined by the Public Suffix List on
<var>host</var>. [[!PSL]]
<li><p>Let <var>registrableDomain</var> be the registrable domain determined by running the
<a href="https://publicsuffix.org/list/">Public Suffix List algorithm</a> with <var>host</var> as
domain. [[!PSL]]

<li><p>Assert: <var>registrableDomain</var> is encoded using A-Labels. [[!UTS46]]

<li><p>Return <var>registrableDomain</var>.
</ol>

<div class=example id=example-host-psl>
Expand Down