Skip to content

Commit

Permalink
Move away from including IANA templates, part 2
Browse files Browse the repository at this point in the history
This concludes moving away from using IANA templates to define HTTP headers. It takes care of Last-Event-ID, Ping-From, Ping-To, Refresh, and X-Frame-Options.

It also adds an index to ensure these headers are still easy to find.

And finally it corrects the casing of several index sections.

This helps with #7274 (kept open to update the IANA registry) and fixes #7355.
  • Loading branch information
annevk committed Nov 23, 2021
1 parent bb7bde0 commit 1e65ef5
Showing 1 changed file with 80 additions and 153 deletions.
233 changes: 80 additions & 153 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -15129,7 +15129,7 @@ people expect to have work and what is necessary.
<p class="note">It is important to use <var>document</var> here, and not <var>meta</var>'s
<span>node document</span>, as that might have changed between the initial set of steps and
the refresh coming due and <var>meta</var> is not always given (in case of the HTTP
`<code data-x="http-refresh">Refresh</code>` header).</p>
`<code>Refresh</code>` header).</p>
</li>

<li><p>Provide the user with an interface that, when selected, <span
Expand Down Expand Up @@ -24144,12 +24144,10 @@ document.body.appendChild(wbr);</code></pre>
</div>


<!--PING-->
<h4><dfn>Hyperlink auditing</dfn></h4>

<div w-nodev>

<h5><dfn>Hyperlink auditing</dfn></h5>

<p>If a <span>hyperlink</span> created by an <code>a</code> or <code>area</code> element has a
<code data-x="attr-hyperlink-ping">ping</code> attribute, and the user follows the hyperlink, and
the value of the element's <code data-x="attr-hyperlink-href">href</code> attribute can be <span
Expand Down Expand Up @@ -24192,16 +24190,15 @@ document.body.appendChild(wbr);</code></pre>
the <span data-x="concept-document-url">URL</span> of the <code>Document</code> containing the
hyperlink being audited is not "<code data-x="">https</code>"</dt>

<dd><var>request</var> must include a `<code data-x="http-ping-from">Ping-From</code>` header
with, as its value, the <span data-x="concept-document-url">URL</span> of the document
containing the hyperlink, and a `<code data-x="http-ping-to">Ping-To</code>` HTTP header with,
as its value, the <var>target URL</var>.</dd>
<dd><var>request</var> must include a `<code>Ping-From</code>` header with, as its value, the
<span data-x="concept-document-url">URL</span> of the document containing the hyperlink, and a
`<code>Ping-To</code>` HTTP header with, as its value, the <var>target URL</var>.</dd>

<dt>Otherwise</dt>

<dd><var>request</var> must include a `<code data-x="http-ping-to">Ping-To</code>` HTTP header
with, as its value, <var>target URL</var>. <span class="note"><var>request</var> does not
include a `<code data-x="http-ping-from">Ping-From</code>` header.</span></dd>
<dd><var>request</var> must include a `<code>Ping-To</code>` HTTP header with, as its value,
<var>target URL</var>. <span class="note"><var>request</var> does not include a
`<code>Ping-From</code>` header.</span></dd>
</dl>
</li>

Expand Down Expand Up @@ -24262,6 +24259,12 @@ document.body.appendChild(wbr);</code></pre>
<!-- resolving ping urls happens at audit time, so base URL changes affect the values of ping
attributes -->

<h5 id="the-ping-headers">The `<code>Ping-From</code>` and `<code>Ping-To</code>` headers</h5>

<p>The `<dfn http-header><code>Ping-From</code></dfn>` and `<dfn
http-header><code>Ping-To</code></dfn>` HTTP request headers are included in <span>hyperlink
auditing</span> requests. Their value is a <span>URL</span>, <span
data-x="concept-url-serializer">serialized</span>.</p>


<h4 id="linkTypes">Link types</h4>
Expand Down Expand Up @@ -87912,7 +87915,7 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location

<li>
<p>If <var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>
has a `<code data-x="http-refresh">Refresh</code>` header, then:</p>
has a `<code>Refresh</code>` header, then:</p>

<ol>
<li><p>Let <var>value</var> be the <span data-x="isomorphic decode">isomorphic decoding</span>
Expand All @@ -87922,8 +87925,8 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
<var>value</var>.</p></li>
</ol>

<p class="XXX">We do not currently have a spec for how to handle multiple `<code
data-x="http-refresh">Refresh</code>` headers. This is tracked as <a
<p class="XXX">We do not currently have a spec for how to handle multiple `<code>Refresh</code>`
headers. This is tracked as <a
href="https://github.com/whatwg/html/issues/2900">issue #2900</a>.</p>
</li>

Expand Down Expand Up @@ -89461,12 +89464,13 @@ interface <dfn interface>BeforeUnloadEvent</dfn> : <span>Event</span> {

<h4>The `<code>X-Frame-Options</code>` header</h4>

<p>The `<code>X-Frame-Options</code>` HTTP response header is a legacy way of controlling whether
and how a <code>Document</code> may be loaded inside of a <span>child browsing context</span>. It
is obsoleted by the <code data-x="frame-ancestors directive">frame-ancestors</code> CSP directive,
which provides more granular control over the same situations. It was originally defined in
<cite>HTTP Header Field X-Frame-Options</cite>, but the definition<span w-nodev> and processing
model</span> here supersedes that document. <ref spec=CSP> <ref spec=RFC7034>
<p>The `<dfn http-header><code>X-Frame-Options</code></dfn>` HTTP response header is a legacy way
of controlling whether and how a <code>Document</code> may be loaded inside of a <span>child
browsing context</span>. It is obsoleted by the <code data-x="frame-ancestors
directive">frame-ancestors</code> CSP directive, which provides more granular control over the
same situations. It was originally defined in <cite>HTTP Header Field X-Frame-Options</cite>, but
the definition<span w-nodev> and processing model</span> here supersedes that document. <ref
spec=CSP> <ref spec=RFC7034>

<p class="note">In particular, <cite>HTTP Header Field X-Frame-Options</cite> specified an `<code
data-x="">ALLOW-FROM</code>` variant of the header, but that is not to be implemented.</p>
Expand Down Expand Up @@ -89677,6 +89681,16 @@ interface <dfn interface>BeforeUnloadEvent</dfn> : <span>Event</span> {
</div>


<h4>The `<code>Refresh</code>` header</h4>

<p>The `<dfn http-header><code>Refresh</code></dfn>` HTTP response header is the HTTP-equivalent
to a <code>meta</code> element with an <code data-x="attr-meta-http-equiv">http-equiv</code>
attribute in the <span data-x="attr-meta-http-equiv-refresh">Refresh state</span>. It takes the
same value and works largely the same. Its processing model is detailed in <span
data-x="create-the-document-object">create and initialize a <code>Document</code> object</span>.
<!-- This might be a retcon. -->



<h2 split-filename="webappapis" id="webappapis">Web application APIs</h2>

Expand Down Expand Up @@ -99245,9 +99259,9 @@ dictionary <dfn dictionary>EventSourceInit</dfn> {
data-x="concept-event-stream-last-event-id">last event ID string</span>, <span data-x="UTF-8
encode">encoded as UTF-8</span>.</p></li>

<li><p><span data-x="concept-header-list-set">Set</span> (`<code
data-x="http-last-event-id">Last-Event-ID</code>`, <var>lastEventIDValue</var>) in
<var>request</var>'s <span data-x="concept-request-header-list">header list</span>.</p></li>
<li><p><span data-x="concept-header-list-set">Set</span> (`<code>Last-Event-ID</code>`,
<var>lastEventIDValue</var>) in <var>request</var>'s <span
data-x="concept-request-header-list">header list</span>.</p></li>
</ol>
</li>

Expand Down Expand Up @@ -99275,6 +99289,13 @@ dictionary <dfn dictionary>EventSourceInit</dfn> {
</div>


<h4>The `<code>Last-Event-ID</code>` header</h4>

<p>The <dfn http-header><code>Last-Event-ID</code></dfn>` HTTP request header reports an
<code>EventSource</code> object's <span data-x="concept-event-stream-last-event-id">last event ID
string</span> to the server when the user agent is to <span>reestablish the connection</span>.


<h4 w-nodev>Parsing an event stream</h4>

<h4 w-dev>The event stream format</h4>
Expand Down Expand Up @@ -99525,15 +99546,14 @@ stocks.onmessage = function (event) {
<p>The following stream contains four blocks. The first block has just a comment, and will fire
nothing. The second block has two fields with names "data" and "id" respectively; an event will
be fired for this block, with the data "first event", and will then set the last event ID to "1"
so that if the connection died between this block and the next, the server would be sent a `<code
data-x="http-last-event-id">Last-Event-ID</code>` header with the value "1". The third block
fires an event with data "second event", and also has an "id" field, this time with no value,
which resets the last event ID to the empty string (meaning no `<code
data-x="http-last-event-id">Last-Event-ID</code>` header will now be sent in the event of a
reconnection being attempted). Finally, the last block just fires an event with the data
"&nbsp;third&nbsp;event" (with a single leading space character). Note that the last still has to
end with a blank line, the end of the stream is not enough to trigger the dispatch of the last
event.</p>
so that if the connection died between this block and the next, the server would be sent a
`<code>Last-Event-ID</code>` header with the value `<code>1</code>`. The third block fires an
event with data "second event", and also has an "id" field, this time with no value, which resets
the last event ID to the empty string (meaning no `<code>Last-Event-ID</code>` header will now be
sent in the event of a reconnection being attempted). Finally, the last block just fires an event
with the data "&nbsp;third&nbsp;event" (with a single leading space character). Note that the
last still has to end with a blank line, the end of the stream is not enough to trigger the
dispatch of the last event.</p>

<pre>: test stream

Expand Down Expand Up @@ -99635,7 +99655,7 @@ data:&nbsp;test

<li>The "push proxy" service contacts the remote HTTP server and requests the resource specified
by the author in the <code data-x="dom-EventSource">EventSource</code> constructor (possibly
including a `<code data-x="http-last-event-id">Last-Event-ID</code>` HTTP header, etc.).</li>
including a `<code>Last-Event-ID</code>` HTTP header, etc.).</li>

<li>The browser allows the mobile device to go to sleep.</li>

Expand Down Expand Up @@ -121355,121 +121375,6 @@ interface <dfn interface>External</dfn> {
<code>text/event-stream</code> resources.</p>


<h3 id="ping-from">`<dfn><code data-x="http-ping-from">Ping-From</code></dfn>`</h3>

<p>This section describes a header for registration in the Permanent Message Header Field
Registry. <ref spec=RFC3864></p>

<dl>
<dt>Header field name:</dt>
<dd>Ping-From</dd>
<dt>Applicable protocol:</dt>
<dd>http</dd>
<dt>Status:</dt>
<dd>standard</dd>
<dt>Author/Change controller:</dt>
<dd>W3C</dd>
<dt>Specification document(s):</dt>
<dd>
This document is the relevant specification.
</dd>
<dt>Related information:</dt>
<dd>None.</dd>
</dl>


<h3 id="ping-to">`<dfn><code data-x="http-ping-to">Ping-To</code></dfn>`</h3>

<p>This section describes a header for registration in the Permanent Message Header Field
Registry. <ref spec=RFC3864></p>

<dl>
<dt>Header field name:</dt>
<dd>Ping-To</dd>
<dt>Applicable protocol:</dt>
<dd>http</dd>
<dt>Status:</dt>
<dd>standard</dd>
<dt>Author/Change controller:</dt>
<dd>W3C</dd>
<dt>Specification document(s):</dt>
<dd>
This document is the relevant specification.
</dd>
<dt>Related information:</dt>
<dd>None.</dd>
</dl>


<h3>`<dfn><code data-x="http-refresh">Refresh</code></dfn>`</h3>

<p>This section describes a header for registration in the Permanent Message Header Field
Registry. <ref spec=RFC3864></p>

<dl>
<dt>Header field name:</dt>
<dd>Refresh</dd>
<dt>Applicable protocol:</dt>
<dd>http</dd>
<dt>Status:</dt>
<dd>standard</dd>
<dt>Author/Change controller:</dt>
<dd>WHATWG</dd>
<dt>Specification document(s):</dt>
<dd>
This document is the relevant specification.
</dd>
<dt>Related information:</dt>
<dd>None.</dd>
</dl>


<h3>`<dfn><code data-x="http-last-event-id">Last-Event-ID</code></dfn>`</h3>

<p>This section describes a header for registration in the Permanent Message Header Field
Registry. <ref spec=RFC3864></p>

<dl>
<dt>Header field name:</dt>
<dd>Last-Event-ID</dd>
<dt>Applicable protocol:</dt>
<dd>http</dd>
<dt>Status:</dt>
<dd>standard</dd>
<dt>Author/Change controller:</dt>
<dd>W3C</dd>
<dt>Specification document(s):</dt>
<dd>
This document is the relevant specification.
</dd>
<dt>Related information:</dt>
<dd>None.</dd>
</dl>


<h3>`<dfn><code>X-Frame-Options</code></dfn>`</h3>

<p>This section describes a header for registration in the Permanent Message Header Field
Registry. <ref spec=RFC3864></p>

<dl>
<dt>Header field name:</dt>
<dd>X-Frame-Options</dd>
<dt>Applicable protocol:</dt>
<dd>http</dd>
<dt>Status:</dt>
<dd>standard</dd>
<dt>Author/Change controller:</dt>
<dd>WHATWG</dd>
<dt>Specification document(s):</dt>
<dd>
This document is the relevant specification.
</dd>
<dt>Related information:</dt>
<dd>None.</dd>
</dl>


<h3><dfn><code data-x="scheme-web">web+</code> scheme prefix</dfn></h3>

<p>This section describes a convention for use with the IANA URI scheme registry. It does not
Expand Down Expand Up @@ -123170,7 +123075,6 @@ interface <dfn interface>External</dfn> {
the <code>th</code> element could be a parent to an <code>a</code> element.</small></p>



<h3 class="no-num">Element content categories</h3>

<!-- NON-NORMATIVE SECTION -->
Expand Down Expand Up @@ -123592,7 +123496,6 @@ interface <dfn interface>External</dfn> {
</table>



<h3 class="no-num">Attributes</h3>

<!-- NON-NORMATIVE SECTION -->
Expand Down Expand Up @@ -125086,7 +124989,7 @@ interface <dfn interface>External</dfn> {
</table>


<h3 class="no-num">Element Interfaces</h3>
<h3 class="no-num">Element interfaces</h3>

<!-- NON-NORMATIVE SECTION -->

Expand Down Expand Up @@ -125552,7 +125455,7 @@ interface <dfn interface>External</dfn> {
</table>


<h3 class="no-num">All Interfaces</h3>
<h3 class="no-num">All interfaces</h3>

<!-- NON-NORMATIVE SECTION -->

Expand Down Expand Up @@ -125846,8 +125749,32 @@ INSERT INTERFACES HERE
href="#dndevents">drag-and-drop events</a>.</p>


<h3 class="no-num">HTTP headers</h3>

<!-- NON-NORMATIVE SECTION -->

<p>The following HTTP request headers are defined by this specification:</p>

<ul>
<li>`<code>Last-Event-ID</code>`</li>
<li>`<code>Ping-From</code>`</li>
<li>`<code>Ping-To</code>`</li>
</ul>

<p>The following HTTP response headers are defined by this specification:</p>

<ul>
<li>`<code>Cross-Origin-Embedder-Policy</code>`</li>
<li>`<code>Cross-Origin-Embedder-Policy-Report-Only</code>`</li>
<li>`<code>Cross-Origin-Opener-Policy</code>`</li>
<li>`<code>Cross-Origin-Opener-Policy-Report-Only</code>`</li>
<li>`<code>Origin-Agent-Cluster</code>`</li>
<li>`<code>Refresh</code>`</li>
<li>`<code>X-Frame-Options</code>`</li>
</ul>


<h3 class="no-num">MIME Types</h3>
<h3 class="no-num">MIME types</h3>

<!-- NON-NORMATIVE SECTION -->

Expand Down

0 comments on commit 1e65ef5

Please sign in to comment.