Skip to content

Commit

Permalink
Address annevk comments
Browse files Browse the repository at this point in the history
  • Loading branch information
meacer committed Sep 27, 2023
1 parent ef08cf0 commit 07886f6
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ Unless stated otherwise, it is false.

<p class=note>This flag is for exclusive use by HTTPS Upgrading algorithm.

<p>A <a for=/>request</a> has an associated <dfn export for=request>HTTPS upgrade fallback URL</dfn>
<p>A <a for=/>request</a> has an associated <dfn export for=request>HTTPS upgrade fallback URL</dfn>,
which is a <a for=/>URL</a>. It is a copy of the <a for=/>request</a>'s original
<a for=request>URL</a> before <a for=/>request</a> is <a href="#https-upgrades-upgrade">optionally
upgraded to HTTPS</a>. Unless stated otherwise, it is unset.
Expand Down Expand Up @@ -3276,20 +3276,21 @@ through TLS using ALPN. The protocol cannot be spoofed through HTTP requests in
</ol>
</div>


<h3 id=https-upgrades>HTTPS upgrading</h3>

<p>User agents may optionally upgrade requests with URLs that are not <a>potentially trustworthy
URLs</a> to attempt to fetch them over <a>potentially trustworthy URLs</a>. If an upgraded request
fails with a network error, it is retried over the original URL.
<p>User agents may optionally upgrade requests with URLs that are not
<a>potentially trustworthy URLs</a> to attempt to fetch them over
<a>potentially trustworthy URLs</a>. If an upgraded request fails with a network error, it is
retried over the original URL.

<p>The HTTPS upgrading algorithm consists of <a>upgrade an HTTP request</a> and <a>HTTPS upgrade
fallback</a> algorithms.

<div algorithm>
<h4 id=https-upgrades-upgrade>HTTPS upgrade algorithm</h4>

<p>To <dfn>upgrade an HTTP request</dfn> given a <a for=/>request</a> <var>request</var>, run these
steps:
<p>To <dfn>upgrade an HTTP request</dfn> given a <a for=/>request</a> <var>request</var>:

<ol>
<li>
Expand Down Expand Up @@ -3319,7 +3320,8 @@ steps:

<p class=note>This is a fallback request that shouldn't be upgraded again.

<li><p>Otherwise, set the following fields:
<li>
<p>Otherwise, set the following fields:
<ul>
<li><p>Set <a for=request>HTTPS upgrade fallback URL</a> to <var>request</var>'s
<a for="request">URL</a>.
Expand All @@ -3337,7 +3339,7 @@ steps:
<h4 id=https-upgrades-fallback>Fallback algorithm</h4>

<p>To run <dfn>HTTPS upgrade fallback</dfn> given a <a for=/>request</a> <var>request</var> and
<a for=/>response</a> <var>response</var>, run these steps:
<a for=/>response</a> <var>response</var>:

<ol>
<li><p>If <var>request</var>'s <a for=request>is HTTPS upgrade</a> is not set, return
Expand All @@ -3355,13 +3357,11 @@ steps:
</ol>

<li>
<p>Return <var>response</var>.
<p class=note>This means the upgrade was successful.
<p>Return <var>response</var>.
<p class=note>This means the upgrade was successful.

</ol>

<p class=note>
User agents can implement a fast-fallback path by canceling slow fetches on upgraded
<p class=note>User agents can implement a fast-fallback path by canceling slow fetches on upgraded
requests, in order to quickly initiate a fallback http load.

</div>
Expand Down Expand Up @@ -4562,12 +4562,12 @@ steps:
<li><p><a>Upgrade <var>request</var> to a potentially trustworthy URL, if appropriate</a>.

<li>
<p>Optionally, run <a>upgrade an HTTP request</a> algorithm on <var>request</var>, if appropriate</a>.
<p>Optionally, run <a>upgrade an HTTP request</a> algorithm on <var>request</var>.

<p class=note>HTTPS upgrading only applies to requests with <a>HTTP(S) scheme</a>s, but it's done
in <a>main fetch</a> instead of <a>HTTP fetch</a> to ensure that <a>upgrade a mixed content
<var>request</var> to a potentially trustworthy URL, if appropriate</a> step runs next and applies
to the upgraded request.
in <a>main fetch</a> instead of <a>HTTP fetch</a> to ensure that
<a>upgrade a mixed content <var>request</var> to a potentially trustworthy URL, if appropriate</a>
step runs next and applies to the upgraded request.

<li><p><a>Upgrade a mixed content <var>request</var> to a potentially trustworthy URL, if appropriate</a>.

Expand Down Expand Up @@ -5277,7 +5277,7 @@ these steps:
<a>filtered response</a>; otherwise to <var>response</var>'s
<a for="filtered response">internal response</a>.

<li><p>If <var>response</var>'s <a for=response>type</a> is "<code>error</code>" then
<li><p>If <var>response</var>'s <a for=response>type</a> is "<code>error</code>", then
return the result of running <a>HTTPS upgrade fallback</a> given <var>request</var>
and a <a>network error</a>.

Expand Down Expand Up @@ -5373,8 +5373,8 @@ these steps:
have different embedder policies.

<li>If <var>request</var>'s <a for=request>is HTTPS upgrade</a> is set, set <var>response</var> and
<var>internalResponse</var> to the result of running
<a>HTTPS upgrade fallback</a> given <var>request</var> and <var>response</var>.
<var>internalResponse</var> to the result of running <a>HTTPS upgrade fallback</a> given
<var>request</var> and <var>response</var>.

<li>
<p>If <var>internalResponse</var>'s <a for=response>status</a> is a <a>redirect status</a>:
Expand Down

0 comments on commit 07886f6

Please sign in to comment.