@@ -2133,18 +2133,17 @@ Unless stated otherwise, it is false.
2133
2133
2134
2134
<p class=note> This flag is for exclusive use by HTML's render-blocking mechanism. [[!HTML]]
2135
2135
2136
- <p> A <a for=/>request</a> has an associated boolean <dfn export for=request>https- upgrade</dfn> .
2136
+ <p> A <a for=/>request</a> has an associated boolean <dfn export for=request>is HTTPS upgrade</dfn> .
2137
2137
Unless stated otherwise, it is false.
2138
2138
2139
- <p class=note> This flag is for exclusive use by https-upgrades algorithm.
2139
+ <p class=note> This flag is for exclusive use by HTTPS Upgrading algorithm.
2140
2140
2141
- <p> A <a for=/>request</a> has an associated
2142
- <dfn export for=request id=https-upgrade-fallback-url>https-upgrade-fallback-url</dfn> . It is a copy
2143
- of the <a for=/>request</a> 's original <a for=/>URL</a> before <a for=/>request</a> is
2144
- <a href="#https-upgrades-upgrade">optionally upgraded to HTTPS</a> . Unless stated otherwise, it is
2145
- unset.
2141
+ <p> A <a for=/>request</a> has an associated <dfn export for=request>HTTPS upgrade fallback URL</dfn>
2142
+ which is a <a for=/>URL</a> . It is a copy of the <a for=/>request</a> 's original
2143
+ <a for=request>URL</a> before <a for=/>request</a> is <a href="#https-upgrades-upgrade">optionally
2144
+ upgraded to HTTPS</a> . Unless stated otherwise, it is unset.
2146
2145
2147
- <p class=note> This flag is for exclusive use by https-upgrades algorithm.
2146
+ <p class=note> This flag is for exclusive use by HTTPS Upgrading algorithm.
2148
2147
2149
2148
<hr>
2150
2149
@@ -3256,76 +3255,84 @@ through TLS using ALPN. The protocol cannot be spoofed through HTTP requests in
3256
3255
3257
3256
<h3 id=https-upgrades>HTTPS upgrading</h3>
3258
3257
3259
- <div algorithm="https-upgrades">
3258
+ <p> User agents may optionally upgrade requests with URLs that are not <a>potentially trustworthy
3259
+ URLs</a> to attempt to fetch them over <a>potentially trustworthy URLs</a> . If an upgraded request
3260
+ fails with a network error, it is retried over the original URL.
3260
3261
3261
- <p> User agents may optionally upgrade requests with URLs that are not
3262
- <a>potentially trustworthy URLs</a> to attempt to fetch them over <a>potentially trustworthy URL</a> s.
3263
- If an upgraded request fails with a network error, it is retried over the original URL.
3264
-
3265
- <p> The HTTPS upgrading algorithm consists of Upgrade and Fallback algorithms, with the following
3266
- steps:
3262
+ <p> The HTTPS upgrading algorithm consists of upgrade and fallback algorithms.
3267
3263
3264
+ <div algorithm>
3268
3265
<h4 id=https-upgrades-upgrade>HTTPS upgrade algorithm</h4>
3269
3266
3270
- To <dfn>upgrade an HTTP request</dfn> given a <a for=/>request</a> <var> request</var> , run these
3267
+ <p> To <dfn>upgrade an HTTP request</dfn> given a <a for=/>request</a> <var> request</var> , run these
3271
3268
steps:
3272
3269
3273
3270
<ol>
3274
- <li>
3275
- <p> If one or more of the following conditions are met, return:
3276
- <ul>
3277
- <li><p><var> request</var> 's <a for="request">destination</a> is not "<code> document</code> "
3271
+ <li>
3272
+ <p> If one or more of the following conditions are met, return:
3273
+ <ul>
3274
+ <li><p><var> request</var> 's <a for="request">destination</a> is not "<code> document</code> "
3278
3275
3279
- <li><p><var> request</var> 's <a for="request">method</a> is not "<code> GET</code> "
3276
+ <li><p><var> request</var> 's <a for="request">method</a> is not "<code> GET</code> "
3280
3277
3281
- <li><p><var> request</var> 's <a for="request">URL</a>' s <a for="url">scheme</a> is not
3282
- "<code> http</code> "
3278
+ <li><p><var> request</var> 's <a for="request">URL</a>' s <a for="url">scheme</a> is not
3279
+ "<code> http</code> "
3283
3280
3284
- <li><p><var> request</var> 's <a for="request">URL</a>' s <a for="url">host</a> is exempted from
3285
- upgrades in an <a>implementation-defined</a> way.
3281
+ <li>
3282
+ <p><var> request</var> 's <a for="request">URL</a>' s <a for="url">host</a> is exempted from
3283
+ upgrades in an <a>implementation-defined</a> way.
3286
3284
3287
- <p class=" example" id="example-https-upgrades-exempted-hosts"> If <a for=url>host</a> is a
3288
- non-registrable or non-assignable domain name such as .local or an IP address that falls in a
3289
- range reserved for non-publicly routable networks, the implementation might return without
3290
- modifying <var> request</var> .
3291
- </ul>
3292
- </li>
3285
+ <p class=example id="example-https-upgrades-exempted-hosts"> If <a for=url>host</a> is a
3286
+ non-registrable or non-assignable domain name such as .local or an IP address that falls in a
3287
+ range reserved for non-publicly routable networks, the implementation might return without
3288
+ modifying <var> request</var> .
3289
+ </ul>
3290
+ </li>
3293
3291
3294
- <li><p> If <var> request</var> 's <code> https-upgrade-fallback-url</code> is non-null, clear the
3295
- <code> https-upgrade</code> and <code> https-upgrade-fallback-url</code> flags and return.
3292
+ <li>
3293
+ <p> If <var> request</var> 's <a for=request>HTTPS upgrade fallback URL</a> is non-null, clear
3294
+ <a for=request>is HTTPS upgrade</a> and <a for=request>HTTPS upgrade fallback URL</a> and return.
3296
3295
3297
- <p class=" note" > This is a fallback request that shouldn't be upgraded again.
3296
+ <p class=note> This is a fallback request that shouldn't be upgraded again.
3298
3297
3299
- <li><p> Otherwise, set the following fields:
3300
- <ul>
3301
- <li> Set <code> https-upgrade-fallback-url</code> to <var> request</var> 's <a for="request">URL</a> .
3302
- <li> Set <var> request</var> 's <a for="request">URL</a>' s <a for="url">scheme</a> to "<code> https</code> ".
3303
- <li> Set <code> https-upgrade</code> flag to true.
3304
- </ul>
3305
- </li>
3298
+ <li><p> Otherwise, set the following fields:
3299
+ <ul>
3300
+ <li><p> Set <a for=request>HTTPS upgrade fallback URL</a> to <var> request</var> 's
3301
+ <a for="request">URL</a> .
3302
+
3303
+ <li><p> Set <var> request</var> 's <a for="request">URL</a>' s <a for="url">scheme</a> to
3304
+ "<code> https</code> ".
3305
+
3306
+ <li><p> Set <a for=request>is HTTPS upgrade</a> to true.
3307
+ </ul>
3308
+ </li>
3306
3309
</ol>
3310
+ </div>
3307
3311
3312
+ <div algorithm>
3308
3313
<h4 id=https-upgrades-fallback>Fallback algorithm</h4>
3309
3314
3310
- To run <dfn>HTTPS upgrade fallback</dfn> given a <a for=/>request</a>
3311
- <var> request </var> and < a for=/>response</a> <var> response</var> , run these steps:
3315
+ <p> To run <dfn>HTTPS upgrade fallback</dfn> given a <a for=/>request</a> <var> request </var> and
3316
+ <a for=/>response</a> <var> response</var> , run these steps:
3312
3317
3313
3318
<ol>
3314
- <li><p> If <var> request</var> 's <code> https- upgrade</code> flag is not set, return
3315
- <var> response</var> .
3319
+ <li><p> If <var> request</var> 's <a for=request>is HTTPS upgrade</a> is not set, return
3320
+ <var> response</var> .
3316
3321
3317
- <li>
3318
- <p> If <var> response</var> is a network error, run the following steps:
3319
- <p class="note"> This means that the upgrade failed and initiates a fallback load.
3320
- <ol>
3321
- <li><p> Let <var> fallbackResponse</var> be a new <a for=/>Response</a> with its <code> Location</code> header set to
3322
- <code> https-upgrade-fallback-url</code> , and its <a for="response">status</a> set to 307.
3323
- <li> Return <var> fallbackResponse</var> .
3324
- </ol>
3322
+ <li>
3323
+ <p> If <var> response</var> is a network error, run the following steps:
3324
+ <p class=note> This means that the upgrade failed and initiates a fallback load.
3325
+ <ol>
3326
+ <li><p> Let <var> fallbackResponse</var> be a new <a for=/>Response</a> with its
3327
+ <code> Location</code> header set to <a for=request>HTTPS upgrade fallback URL</a> , and its
3328
+ <a for="response">status</a> set to 307.
3329
+
3330
+ <li> Return <var> fallbackResponse</var> .
3331
+ </ol>
3325
3332
3326
- <li>
3327
- <p class=" note" > The upgrade was successful.
3328
- <p> Return <var> response</var> .
3333
+ <li>
3334
+ <p class=note> The upgrade was successful.
3335
+ <p> Return <var> response</var> .
3329
3336
</ol>
3330
3337
3331
3338
<p class=note>
@@ -3337,9 +3344,8 @@ requests, in order to quickly initiate a fallback http load.
3337
3344
<h4 id=http-upgrades-examples>Examples</h4>
3338
3345
3339
3346
<div id=example-https-upgrade-good-https class=example>
3340
- <p>
3341
- <code> a.com</code> serves both <code> http://a.com</code> and <code> https://a.com</code> .
3342
- An eligible request to <code> http://a.com</code> will be upgraded to <code> https://a.com</code> .
3347
+ <p><code> a.com</code> serves both <code> http://a.com</code> and <code> https://a.com</code> . An
3348
+ eligible request to <code> http://a.com</code> will be upgraded to <code> https://a.com</code> .
3343
3349
</div>
3344
3350
3345
3351
<div id=example-https-upgrade-bad-https class=example>
@@ -4530,11 +4536,12 @@ steps:
4530
4536
4531
4537
<li><p> <a>Upgrade <var>request</var> to a potentially trustworthy URL, if appropriate</a> .
4532
4538
4533
- <li><p> Optionally, run <a>upgrade an HTTP request</a> algorithm on <var> request</var> , if appropriate</a> .
4539
+ <li>
4540
+ <p> Optionally, run <a>upgrade an HTTP request</a> algorithm on <var> request</var> , if appropriate</a> .
4534
4541
4535
- <p class=" note" > HTTPS upgrading only applies to requests with <a>HTTP(S) scheme</a> s, but it's done
4536
- in <a>main fetch</a> instead of <a>HTTP fetch</a> to ensure that <a>upgrade a mixed content</a>
4537
- step runs next and applies to the upgraded request.</p>
4542
+ <p class=note> HTTPS upgrading only applies to requests with <a>HTTP(S) scheme</a> s, but it's done
4543
+ in <a>main fetch</a> instead of <a>HTTP fetch</a> to ensure that <a>upgrade a mixed content</a>
4544
+ step runs next and applies to the upgraded request.
4538
4545
4539
4546
<li><p> <a>Upgrade a mixed content <var>request</var> to a potentially trustworthy URL, if appropriate</a> .
4540
4547
@@ -5258,8 +5265,8 @@ these steps:
5258
5265
<a for="filtered response">internal response</a> .
5259
5266
5260
5267
<li><p> If <var> response</var> 's <a for=response>type</a> is "<code> error</code> " then
5261
- return the result of running <a>HTTPS upgrade fallback</a> given <var> request</var>
5262
- and a <a>network error</a> .
5268
+ return the result of running <a>HTTPS upgrade fallback</a> given <var> request</var>
5269
+ and a <a>network error</a> .
5263
5270
5264
5271
<li>
5265
5272
<p> If one of the following is true
@@ -5352,7 +5359,7 @@ these steps:
5352
5359
<a>CORS check</a> , as <var> request</var> 's <a for=request>client</a> and the service worker can
5353
5360
have different embedder policies.
5354
5361
5355
- <li> If <var> request</var> 's <code> https- upgrade</code> flag is set, set <var> response</var> and
5362
+ <li> If <var> request</var> 's <a for=request>is HTTPS upgrade</a> is set, set <var> response</var> and
5356
5363
<var> internalResponse</var> to the result of running
5357
5364
<a>HTTPS upgrade fallback</a> given <var> request</var> and <var> response</var> .
5358
5365
0 commit comments