Skip to content

Commit

Permalink
Editorial: fix referrer policy reference
Browse files Browse the repository at this point in the history
Closes #432. (Also cleanup UTF-8 mentions.)
  • Loading branch information
annevk committed Dec 16, 2016
1 parent e03ee6f commit 22b0afe
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions fetch.bs
Expand Up @@ -2364,15 +2364,11 @@ with a <i>CORS flag</i> and <i>recursive flag</i>, run these steps:
[[!MIX]]
[[!CSP]]

<li><p>If <var>request</var>'s <a for=request>referrer policy</a>
is the empty string and <var>request</var>'s
<a for=request>client</a> is non-null, then set <var>request</var>'s
<a for=request>referrer policy</a> to <var>request</var>'s
<a for=request>client</a>'s
<a lt="environment settings object">referrer policy</a>.
<li><p>If <var>request</var>'s <a for=request>referrer policy</a> is the empty string and
<var>request</var>'s <a for=request>client</a> is non-null, then set <var>request</var>'s
<a for=request>referrer policy</a> to <var>request</var>'s <a for=request>client</a>'s
<a for="environment settings object">referrer policy</a>.
[[!REFERRER]]
<!-- We use "environment settings object" here because the HTML Standard does not have a definition
for the referrer policy concept that is associated with it. -->

<li>
<p>If <var>request</var>'s <a for=request>referrer policy</a>
Expand Down Expand Up @@ -3099,7 +3095,7 @@ steps:

<li><p>If <var>httpRequest</var>'s <a for=request>body</a> is non-null, set
<var>contentLengthValue</var> to <var>httpRequest</var>'s <a for=request>body</a>'s
<a for=body>total bytes</a>, <a>utf-8 encoded</a>.
<a for=body>total bytes</a>, <a>UTF-8 encoded</a>.
<!-- XXX with streams we don't always know the length and so need to do chunked here -->

<li><p>If <var>contentLengthValue</var> is non-null,
Expand All @@ -3120,15 +3116,15 @@ steps:

<li><p>If <var>httpRequest</var>'s <a for=request>referrer</a> is a <a for=/>URL</a>, then
<a for="header list">append</a> `<code>Referer</code>`/<var>httpRequest</var>'s
<a for=request>referrer</a>, <a lt="url serializer">serialized</a> and <a>utf-8 encoded</a>, to
<a for=request>referrer</a>, <a lt="url serializer">serialized</a> and <a>UTF-8 encoded</a>, to
<var>httpRequest</var>'s <a for=request>header list</a>.
<!-- XXX ideally we have an easier way to convert something ASCII-safe into bytes
concept-as-bytes -->

<li><p>If the <i>CORS flag</i> is set or <var>httpRequest</var>'s <a for=request>method</a> is
neither `<code>GET</code>` nor `<code>HEAD</code>`, then <a for="header list">append</a>
`<code>Origin</code>`/<var>httpRequest</var>'s <a for=request>origin</a>,
<a lt="ASCII serialization of an origin">serialized</a> and <a>utf-8 encoded</a>, to
<a lt="ASCII serialization of an origin">serialized</a> and <a>UTF-8 encoded</a>, to
<var>httpRequest</var>'s <a for=request>header list</a>.
<!-- XXX concept-as-bytes -->

Expand Down Expand Up @@ -3901,7 +3897,7 @@ Entries may be removed before that moment arrives.
"<code>include</code>" and <var>origin</var> is `<code>*</code>`, return success.

<li><p>If <var>request</var>'s <a for=request>origin</a>,
<a lt="ASCII serialization of an origin">serialized</a> and <a>utf-8 encoded</a>, is not
<a lt="ASCII serialization of an origin">serialized</a> and <a>UTF-8 encoded</a>, is not
<var>origin</var>, return failure.
<!-- XXX concept-as-bytes -->

Expand Down Expand Up @@ -4253,7 +4249,7 @@ typedef (BodyInit or ReadableStream) ResponseBodyInit;</pre>
<dd>
<p>Set <var>action</var> to an action that runs the
<a><code>multipart/form-data</code> encoding algorithm</a>, with <var>object</var> as
<var ignore>form data set</var> and with <a>utf-8</a> as the explicit character encoding.
<var ignore>form data set</var> and with <a>UTF-8</a> as the explicit character encoding.
<!-- need to provide explicit character encoding because otherwise the encoding of the
document is used -->

Expand All @@ -4267,14 +4263,14 @@ typedef (BodyInit or ReadableStream) ResponseBodyInit;</pre>
<a lt="urlencoded serializer"><code>application/x-www-form-urlencoded</code>
serializer</a> with <var>object</var>'s
<a for=URLSearchParams>list</a>.
<!-- utf-8 implied -->
<!-- UTF-8 implied -->

<p>Set <var>Content-Type</var> to
`<code>application/x-www-form-urlencoded;charset=UTF-8</code>`.

<dt><code>USVString</code>
<dd>
<p>Set <var>action</var> to an action that runs <a>utf-8 encode</a> on <var>object</var>.
<p>Set <var>action</var> to an action that runs <a>UTF-8 encode</a> on <var>object</var>.

<p>Set <var>Content-Type</var> to `<code>text/plain;charset=UTF-8</code>`.

Expand Down Expand Up @@ -4414,11 +4410,11 @@ runs the associated steps:
<dt><i>JSON</i>
<dd>
<p>Return the result of invoking the initial value of the <code>parse</code> property of the
<code>JSON</code> object with the result of running <a>utf-8 decode</a> on <var>bytes</var> as
<code>JSON</code> object with the result of running <a>UTF-8 decode</a> on <var>bytes</var> as
argument. Rethrow any exceptions.

<dt><i>text</i>
<dd><p>Return the result of running <a>utf-8 decode</a> on
<dd><p>Return the result of running <a>UTF-8 decode</a> on
<var>bytes</var>.
</dl>

Expand Down Expand Up @@ -5096,7 +5092,7 @@ method, when invoked, must run these steps:
<a for=response>status</a> to <var>status</var>.

<li><p><a for="header list">Set</a> `<code>Location</code>` to <var>parsedURL</var>,
<a lt="url serializer">serialized</a> and <a>utf-8 encoded</a>, in <var>r</var>'s
<a lt="url serializer">serialized</a> and <a>UTF-8 encoded</a>, in <var>r</var>'s
<a for=Response>response</a>'s <a for=response>header list</a>.

<li><p>Return <var>r</var>.
Expand Down

0 comments on commit 22b0afe

Please sign in to comment.