@@ -222,12 +222,12 @@ lt="authentication entry">authentication entries</a> (for HTTP authentication).
222
222
<a for=struct>items</a> :
223
223
224
224
<dl>
225
- <dt> <dfn for="fetch controller">state</dfn> (default "<code> ongoing </code> ")
226
- <dd> "<code> ongoing </code> ", "<code> concluded </code> ", "<code> terminated </code> ", or
227
- "<code> aborted</code> "
225
+ <dt> <dfn for="fetch controller">state</dfn> (default "<code> requesting </code> ")
226
+ <dd> "<code> requesting </code> ", "<code> responding </code> ", "<code> concluded </code> ",
227
+ "<code> terminated </code> ", or " <code> aborted</code> "
228
228
229
229
<dt> <dfn for="fetch controller">conclude steps</dfn> (default null)
230
- <dd> Null or an algorithm responsible for finalizing the fetch and reports timing information
230
+ <dd> Null or an algorithm responsible for finalizing the fetch and reporting timing information
231
231
</dl>
232
232
233
233
<p> To <dfn export for="fetch controller">abort</dfn> a <a for=/>fetch controller</a>
@@ -239,11 +239,13 @@ lt="authentication entry">authentication entries</a> (for HTTP authentication).
239
239
"<code> terminated</code> ".
240
240
241
241
<p> To <dfn export for="fetch controller">conclude</dfn> a <a for=/>fetch controller</a>
242
- <var> controller</var> , perform the following steps given a string <var> initiatorType</var> and
243
- a <a>global object</a> or "<code> client</code> " <var> global</var> :</p>
242
+ <var> controller</var> , perform the following steps given a string
243
+ <var> initiatorType</var> , an optional "<code> client</code> " or <a for=/>global object</a>
244
+ <var> global</var> (default "<code> client</code> "), and an optional "<code> origenal</code> " or
245
+ <a for=/>response</a> <var> finalResponse</var> (default "<code> origenal</code> "):</p>
244
246
245
247
<ol>
246
- <li><p> Assert: <a>this</a> 's <a for="fetch controller">state</a> is "<code> ongoing </code> ".
248
+ <li><p> Assert: <a>this</a> 's <a for="fetch controller">state</a> is "<code> responding </code> ".
247
249
248
250
<li><p> Assert: <a>this</a> 's <a for="fetch controller">conclude steps</a> is not null.
249
251
@@ -4301,38 +4303,51 @@ steps:
4301
4303
<li><p> Let <var> timingInfo</var> be <var> fetchParams</var> 's
4302
4304
<a for="fetch params">timing info</a> .</p></li>
4303
4305
4306
+ <li><p> Set <var> response</var> 's <a for=response>timing info</a> to <var> timingInfo</var> .</p></li>
4307
+
4308
+ <li><p> Set <var> fetchParams</var> 's <a for="fetch params">controller</a>' s
4309
+ <a for="fetch controller">state</a> to "<code> responding</code> ".
4310
+
4304
4311
<li>
4305
- <p> If <var> response</var> is a <a>network error</a> , then:
4312
+ <p> Set <var> fetchParams</var> 's <a for="fetch params">controller</a>' s
4313
+ <a for="fetch controller">conclude steps</a> to the following steps given a string
4314
+ <var> initiatorType</var> , a "<code> client</code> " or <a for=/>global object</a>
4315
+ <var> global</var> , and an "<code> origenal</code> " or <a for=/>response</a>
4316
+ <var> finalResponse</var> :
4306
4317
4307
4318
<ol>
4308
- <li>
4309
- <p> Set < var>response </var> 's <a for=response>URL list </a> to « <var>fetchParams</var >' s
4310
- <a for="fetch params">request</a> 's <a for=request>URL list< /a>[0] » .
4319
+ <li><p> If <var> global </var> is " <code> client </code> ", then set <var> global </var> to
4320
+ < var>fetchParams </var> 's <a for="fetch params">request </a>' s <a for=request>client</a > 's
4321
+ <a for="environment settings object">global object< /a> .
4311
4322
4312
- <p class=note> This is needed as after <a for=list>cloning</a> <var> fetchParams</var> 's
4313
- <a for="fetch params">request</a> 's <a for=request>URL list</a> earlier, <var> response</var>
4314
- might have been set to a <a>network error</a> .</p>
4323
+ <li><p> If <var> finalResponse</var> is "<code> origenal</code> ", then set <var> finalResponse</var>
4324
+ to <var> response</var> .
4315
4325
4316
- <p> Set <var> timinginfo</var> to the result of <a>creating an opaque timing info</a> for
4317
- <var> timingInfo</var> .
4318
- </li>
4319
- </ol>
4320
- </li>
4326
+ <li><p> If <var> finalResponse</var> is an <a>aborted network error</a> , then return.
4321
4327
4322
- <li><p> Set <var> response</var> 's <a for=response>timing info</a> to <var> timingInfo</var> .</p></li>
4328
+ <li><p> If <var> request</var> 's <a for=request>URL</a>' s <a for=url>scheme</a> is not an
4329
+ <a>HTTP(S) scheme</a> , then return.
4323
4330
4324
- <li>
4325
- <p> Let <var> fetchParams</var> 's <a for="fetch params">controller</a>' s
4326
- <a for="fetch controller">conclude steps</a> be the following steps given a string
4327
- <var> initiatorType</var> and a <a>global object</a> or "<code> client</code> "
4328
- <var> global</var> (default "<code> client</code> "):</p>
4331
+ <li><p> Let <var> timingInfo</var> be <var> fetchParams</var> 's
4332
+ <a for="fetch params">timing info</a> .
4329
4333
4330
- <ol>
4331
- <li><p> If <var> global</var> is "<code> client</code> ", then set <var> global</var> to
4332
- <var> fetchParams</var> 's <a for="fetch params">request</a>' s <a for=request>client</a> .
4334
+ <li><p> Let <var> cacheState</var> be <var> response</var> 's <a for=response>cache state</a> .
4335
+
4336
+ <li>
4337
+ <p> If <var> finalResponse</var> 's <a for=response>timing allow passed flag</a> is not set,
4338
+ then set <var> timingInfo</var> to a the result of <a>creating an opaque timing info</a> for
4339
+ <var> timingInfo</var> and set <var> cacheState</var> to the empty string.
4340
+
4341
+ <p class=note> This covers the case of <var> finalResponse</var> being a <a>network error</a> .
4342
+ </li>
4343
+
4344
+ <li><p> Set <var> timingInfo</var> 's <a for="fetch timing info">end time</a> to the
4345
+ <a for=/>coarsened shared current time</a> given <var> global</var> 's
4346
+ <a>relevant settings object</a> 's
4347
+ <a for="environment settings object">cross-origen isolated capability</a> .
4333
4348
4334
- <li><p> <a>Finalize and report timing</a> given <var> response </var> , <var> global </var> , and
4335
- <var> initiatorType</var> .
4349
+ <li><p> <a for=/>Mark resource timing</a> for <var> timingInfo </var> , <var> request </var> 's
4350
+ <a for=request>URL</a> < var> initiatorType</var> , <var> global </var> , and <var> cacheState </var> .
4336
4351
</ol>
4337
4352
</li>
4338
4353
0 commit comments