@@ -3300,26 +3300,22 @@ steps:
3300
3300
3301
3301
<h4 id=https-upgrades-fallback>Fallback algorithm</h4>
3302
3302
3303
- <p> Runs after the Upgrade algorithm. This algorithm determines whether the upgraded
3304
- request completed without a network error. If not, it retries the request over <code> "http"</code> .
3305
-
3306
- To <dfn>handle an HTTPS upgrade fallback</dfn> given a <a for=/>request</a> <var> request</var> , run
3307
- these steps:
3303
+ To <dfn>HTTPS upgrade fallback</dfn> given a <a for=/>request</a>
3304
+ <var> request</var> and <a for=/>response</a> <var> response</var> , run these steps:
3308
3305
3309
3306
<ol>
3310
- <li><p> If <var> request</var> 's <code> https-upgrade</code> flag is not set, return without
3311
- modifying request.
3312
-
3313
- <li><p> Otherwise, this is an upgraded request. Let <var> upgradedResponse</var> be the result of
3314
- fetching the upgraded request.
3307
+ <li><p> If <var> request</var> 's <code> https-upgrade</code> flag is not set, the <var> request</var>
3308
+ was not upgraded. Return <var> response</var> .
3315
3309
3316
3310
<li>
3317
- <p> If <var> upgradedResponse</var> is a network error, initiate a fallback load by creating a
3318
- synthetic redirect response <var> fallbackResponse</var> that redirects to <var> request</var> 's
3319
- <code> https-upgrade-fallback-url</code> flag with status 307. Return
3320
- <var> fallbackResponse</var> .
3311
+ <p> Otherwise, the request was upgraded.
3312
+
3313
+ <p> If <var> response</var> is a network error, the upgrade failed. Initiate a fallback
3314
+ load by creating a synthetic redirect response <var> fallbackResponse</var> that redirects to
3315
+ <var> request</var> 's <code> https-upgrade-fallback-url</code> flag with status 307.
3316
+ Return <var> fallbackResponse</var> .
3321
3317
3322
- <li><p> Otherwise, the upgrade was successful. Return <var> upgradedResponse </var> .
3318
+ <li><p> Otherwise, the upgrade was successful. Return <var> response </var> .
3323
3319
</ol>
3324
3320
3325
3321
<p class=note>
@@ -5266,7 +5262,8 @@ these steps:
5266
5262
<var> response</var> 's <a for=response>URL list</a> has more than one item.
5267
5263
</ul>
5268
5264
5269
- <p> then return a <a>network error</a> .
5265
+ <p> then return the result of running <a>HTTPS upgrade fallback</a> given <var> request</var>
5266
+ and a <a>network error</a> .
5270
5267
</ol>
5271
5268
</ol>
5272
5269
@@ -5333,14 +5330,16 @@ these steps:
5333
5330
<a>cross-origin resource policy check</a> with <var> request</var> 's <a for=request>origin</a> ,
5334
5331
<var> request</var> 's <a for=request>client</a>, <var>request</var>' s
5335
5332
<a for=request>destination</a> , and <var> internalResponse</var> returns <b> blocked</b> , then
5336
- return a <a>network error</a> .
5333
+ return the result of running <a>HTTPS upgrade fallback</a> given <var> request</var>
5334
+ and a <a>network error</a> .
5337
5335
5338
5336
<p class=note> The <a>cross-origin resource policy check</a> runs for responses coming from the
5339
5337
network and responses coming from the service worker. This is different from the
5340
5338
<a>CORS check</a> , as <var> request</var> 's <a for=request>client</a> and the service worker can
5341
5339
have different embedder policies.
5342
5340
5343
- <li><p> Run <a>handle an HTTPS upgrade fallback</a> algorithm on <var> request</var> , if appropriate.</a>
5341
+ <li> Set <var> response</var> and <var> internalResponse</var> to the result of running
5342
+ <a>HTTPS upgrade fallback</a> given <var> request</var> and <var> response</var> .
5344
5343
5345
5344
<li>
5346
5345
<p> If <var> internalResponse</var> 's <a for=response>status</a> is a <a>redirect status</a> :
0 commit comments