@@ -2047,8 +2047,9 @@ evolves over time. That is, not all its fields are available straight away.
2047
2047
"<code> cors</code> ",
2048
2048
"<code> default</code> ",
2049
2049
"<code> error</code> ",
2050
- "<code> opaque</code> ", or
2051
- "<code> opaqueredirect</code> ".
2050
+ "<code> opaque</code> ",
2051
+ "<code> opaqueredirect</code> ", or
2052
+ "<code> opaqueauth</code> ".
2052
2053
Unless stated otherwise, it is "<code> default</code> ".
2053
2054
2054
2055
<p> A <a for=/>response</a> can have an associated
@@ -2235,6 +2236,15 @@ is a <a>filtered response</a> whose
2235
2236
<a attribute for=Response lt=ok><code>response.ok</code></a> , will return rather useless results.
2236
2237
</div>
2237
2238
2239
+ <p> An
2240
+ <dfn export id=concept-filtered-response-opaque-auth>opaque-auth filtered response</dfn>
2241
+ is a <a>filtered response</a> whose
2242
+ <a for=response>type</a> is "<code> opaqueauth</code> ",
2243
+ <a for=response>status</a> is 0,
2244
+ <a for=response>status message</a> is the empty byte sequence,
2245
+ <a for=response>header list</a> is empty, and
2246
+ <a for=response>body</a> is null.
2247
+
2238
2248
<p> To <dfn export for=response id=concept-response-clone>clone</dfn> a
2239
2249
<a for=/>response</a> <var> response</var> , run these steps:
2240
2250
@@ -4864,10 +4874,12 @@ steps. They return a <a for=/>response</a>.
4864
4874
4865
4875
<li><p> Let <var> httpRequest</var> be null.
4866
4876
4867
- <li><p> Let <var> response </var> be null.
4877
+ <li><p> Let <var> actualResponse </var> be null.
4868
4878
4869
4879
<li><p> Let <var> storedResponse</var> be null.
4870
4880
4881
+ <li><p> Let <var> response</var> be null.
4882
+
4871
4883
<li><p> Let <var> httpCache</var> be null.
4872
4884
4873
4885
<li><p> Let the <var> revalidatingFlag</var> be unset.
@@ -5146,9 +5158,9 @@ steps. They return a <a for=/>response</a>.
5146
5158
<a for=request>client</a> is non-null, then:
5147
5159
5148
5160
<ol>
5149
- <li><p> Set <var> response </var> to <var> storedResponse</var> .
5161
+ <li><p> Set <var> actualResponse </var> to <var> storedResponse</var> .
5150
5162
5151
- <li><p> Set <var> response </var> 's <a for=response>cache state</a> to "<code> local</code> ".
5163
+ <li><p> Set <var> actualResponse </var> 's <a for=response>cache state</a> to "<code> local</code> ".
5152
5164
5153
5165
<li><p> Let <var> revalidateRequest</var> be a <a for=request>clone</a> of
5154
5166
<var> request</var> .
@@ -5201,8 +5213,8 @@ steps. They return a <a for=/>response</a>.
5201
5213
"<a href=https://datatracker.ietf.org/doc/html/rfc7234#section-4.3.4>Sending a Validation Request</a> "
5202
5214
chapter of <cite> HTTP Caching</cite> [[!HTTP-CACHING]] .
5203
5215
5204
- <li><p> Otherwise, set <var> response </var> to <var> storedResponse</var> and set
5205
- <var> response </var> 's <a for=response>cache state</a> to "<code> local</code> ".
5216
+ <li><p> Otherwise, set <var> actualResponse </var> to <var> storedResponse</var> and set
5217
+ <var> actualResponse </var> 's <a for=response>cache state</a> to "<code> local</code> ".
5206
5218
</ol>
5207
5219
</ol>
5208
5220
</ol>
@@ -5212,9 +5224,9 @@ steps. They return a <a for=/>response</a>.
5212
5224
<var> fetchParams</var> .
5213
5225
5214
5226
5215
- <!-- If response is still null, we require a forwarded request. -->
5227
+ <!-- If actualResponse is still null, we require a forwarded request. -->
5216
5228
<li>
5217
- <p> If <var> response </var> is null, then:
5229
+ <p> If <var> actualResponse </var> is null, then:
5218
5230
5219
5231
<ol>
5220
5232
<li><p> If <var> httpRequest</var> 's <a for=request>cache mode</a> is
@@ -5243,19 +5255,19 @@ steps. They return a <a for=/>response</a>.
5243
5255
5244
5256
<p class="note"> This updates the stored response in cache as well.
5245
5257
5246
- <li><p> Set <var> response </var> to <var> storedResponse</var> .
5258
+ <li><p> Set <var> actualResponse </var> to <var> storedResponse</var> .
5247
5259
5248
5260
<li><p> Set <var> response</var> 's <a for=response>cache state</a> to "<code> validated</code> ".
5249
5261
5250
5262
<li><p> <a for=/>Update timing info from stored response</a> given <var> fetchParams</var> 's
5251
- <a for="fetch params">timing info</a> and <var> response </var> .
5263
+ <a for="fetch params">timing info</a> and <var> actualResponse </var> .
5252
5264
</ol>
5253
5265
5254
5266
<li>
5255
- <p> If <var> response </var> is null, then:
5267
+ <p> If <var> actualResponse </var> is null, then:
5256
5268
5257
5269
<ol>
5258
- <li><p> Set <var> response </var> to <var> forwardResponse</var> .
5270
+ <li><p> Set <var> actualResponse </var> to <var> forwardResponse</var> .
5259
5271
5260
5272
<li>
5261
5273
<p> Store <var> httpRequest</var> and <var> forwardResponse</var> in <var> httpCache</var> , as per
@@ -5270,17 +5282,17 @@ steps. They return a <a for=/>response</a>.
5270
5282
</ol>
5271
5283
</ol>
5272
5284
5273
- <li><p> Set <var> response </var> 's <a for=response>URL list</a> to a <a for=list>clone</a> of
5285
+ <li><p> Set <var> actualResponse </var> 's <a for=response>URL list</a> to a <a for=list>clone</a> of
5274
5286
<var> httpRequest</var> 's <a for=request>URL list</a> .
5275
5287
5276
5288
<li><p> If <var> httpRequest</var> 's <a for=request>header list</a> <a for="header list">contains</a>
5277
- `<code> Range</code> `, then set <var> response </var> 's <a for=response>range-requested flag</a> .
5289
+ `<code> Range</code> `, then set <var> actualResponse </var> 's <a for=response>range-requested flag</a> .
5278
5290
5279
5291
<li><p> Set <var> response</var> 's <a for=response>request-includes-credentials</a> to
5280
5292
<var> includeCredentials</var> .
5281
5293
5282
5294
<li>
5283
- <p> If <var> response </var> 's <a for=response>status</a> is 401, <var>httpRequest</var>' s
5295
+ <p> If <var> actualResponse </var> 's <a for=response>status</a> is 401, <var>httpRequest</var>' s
5284
5296
<a for=request>response tainting</a> is not "<code> cors</code> ", <var> includeCredentials</var> is
5285
5297
true, and <var> request</var> 's <a for=request>window</a> is an <a>environment settings object</a> ,
5286
5298
then:
@@ -5311,21 +5323,26 @@ steps. They return a <a for=/>response</a>.
5311
5323
5312
5324
<li><p> Let <var> username</var> and <var> password</var> be the result of prompting the end user
5313
5325
for a username and password, respectively, in <var> request</var> 's
5314
- <a for=request>window</a> .
5326
+ <a for=request>window</a> . If a username and password cannot be obtained from the end user,
5327
+ set <var> response</var> to an <a>opaque-auth filtered response</a> whose
5328
+ <a for="filtered response">internal response</a> is <var> actualResponse</var> . Otherwise:
5329
+
5330
+ <ol>
5331
+ <li><p> <a>Set the username</a> given <var> request</var> 's <a for=request>current URL</a> and
5332
+ <var> username</var> .
5315
5333
5316
- <li><p> <a>Set the username </a> given <var> request</var> 's <a for=request>current URL</a> and
5317
- <var> username </var> .
5334
+ <li><p> <a>Set the password </a> given <var> request</var> 's <a for=request>current URL</a> and
5335
+ <var> password </var> .
5318
5336
5319
- <li><p> <a>Set the password</a> given <var> request</var> 's <a for=request>current URL</a> and
5320
- <var> password</var> .
5337
+ <li><p> Set <var> actualResponse</var> to the result of running <a>HTTP-network-or-cache fetch</a> given
5338
+ <var> fetchParams</var> and true.
5339
+ </ol>
5321
5340
</ol>
5322
5341
5323
- <li><p> Set <var> response</var> to the result of running <a>HTTP-network-or-cache fetch</a> given
5324
- <var> fetchParams</var> and true.
5325
5342
</ol>
5326
5343
5327
5344
<li>
5328
- <p> If <var> response </var> 's <a for=response>status</a> is 407, then:
5345
+ <p> If <var> actualResponse </var> 's <a for=response>status</a> is 407, then:
5329
5346
5330
5347
<ol>
5331
5348
<li><p> If <var> request</var> 's <a for=request>window</a> is
@@ -5340,14 +5357,21 @@ steps. They return a <a for=/>response</a>.
5340
5357
<li>
5341
5358
<p> Prompt the end user as appropriate in <var> request</var> 's
5342
5359
<a for=request>window</a> and store the result as a
5343
- <a>proxy-authentication entry</a> . [[!HTTP-AUTH]]
5360
+ <a>proxy-authentication entry</a> . [[!HTTP-AUTH]] If the user cannot be prompted,
5361
+ set <var> response</var> to an <a>opaque-auth filtered response</a> whose
5362
+ <a for="filtered response">internal response</a> is <var> actualResponse</var> . Otherwise:
5363
+
5364
+ <ol>
5365
+ <li><p> Set <var> actualResponse</var> to the result of running <a>HTTP-network-or-cache fetch</a> given
5366
+ <var> fetchParams</var> .
5367
+ </ol>
5344
5368
5345
5369
<p class=note> Remaining details surrounding proxy authentication are defined by HTTP.
5346
5370
5347
- <li><p> Set <var> response</var> to the result of running <a>HTTP-network-or-cache fetch</a> given
5348
- <var> fetchParams</var> .
5349
5371
</ol>
5350
5372
5373
+ <li> If <var> response</var> is null, set <var> response</var> to <var> actualResponse</var> .
5374
+
5351
5375
<li>
5352
5376
<p> If all of the following are true
5353
5377
@@ -7401,7 +7425,7 @@ dictionary ResponseInit {
7401
7425
HeadersInit headers;
7402
7426
};
7403
7427
7404
- enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredirect" };
7428
+ enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredirect", "opaqueauth" };
7405
7429
</pre>
7406
7430
7407
7431
<p> A {{Response}} object has an associated
0 commit comments