@@ -196,7 +196,7 @@ lt="authentication entry">authentication entries</a> (for HTTP authentication).
196
196
<dt> <dfn for="fetch params">process request end-of-body</dfn> (default null)
197
197
<dt> <dfn for="fetch params">process response</dfn> (default null)
198
198
<dt> <dfn for="fetch params">process response end-of-body</dfn> (default null)
199
- <dt> <dfn for="fetch params">process response done </dfn> (default null)
199
+ <dt> <dfn for="fetch params">process response consume body </dfn> (default null)
200
200
<dd> Null or an algorithm.
201
201
202
202
<dt> <dfn for="fetch params">task destination</dfn> (default null)
@@ -3739,17 +3739,18 @@ optional algorithm
3739
3739
<dfn export for=fetch id=process-request-body><var>processRequestBodyChunkLength</var></dfn> , an
3740
3740
optional algorithm
3741
3741
<dfn export for=fetch id=process-request-end-of-body oldids=process-request-end-of-file><var>processRequestEndOfBody</var></dfn> ,
3742
- an optional algorithm <dfn export for=fetch id=process-response><var>processResponse</var></dfn> ,
3743
- an optional algorithm
3744
- <dfn export for=fetch id=process-response-end-of-body oldids=process-response-end-of-file><var>processResponseEndOfBody</var></dfn> ,
3745
- an optional algorithm <dfn export for=fetch><var>processResponseDone</var></dfn> , and an optional
3746
- boolean <dfn export for=fetch><var>useParallelQueue</var></dfn> (default false), run the steps
3747
- below. If given, <var> processRequestBodyChunkLength</var> must be an algorithm accepting an integer
3748
- representing the number of bytes transmitted. If given, <var> processRequestEndOfBody</var> must be
3749
- an algorithm accepting no arguments. If given, <var> processResponse</var> must be an algorithm
3750
- accepting a <a for=/>response</a> . If given, <var> processResponseEndOfBody</var> must be an
3751
- algorithm accepting a <a for=/>response</a> and null, failure, or a <a for=/>byte sequence</a> . If
3752
- given, <var> processResponseDone</var> must be an algorithm accepting a <a for=/>response</a> .
3742
+ an optional algorithm <dfn export for=fetch id=process-response><var>processResponse</var></dfn> , an
3743
+ optional algorithm <dfn export for=fetch><var>processResponseEndOfBody</var></dfn> , an optional
3744
+ algorithm
3745
+ <dfn export for=fetch id=process-response-end-of-body oldids=process-response-end-of-file><var>processResponseConsumeBody</var></dfn> ,
3746
+ and an optional boolean <dfn export for=fetch><var>useParallelQueue</var></dfn> (default false), run
3747
+ the steps below. If given, <var> processRequestBodyChunkLength</var> must be an algorithm accepting
3748
+ an integer representing the number of bytes transmitted. If given,
3749
+ <var> processRequestEndOfBody</var> must be an algorithm accepting no arguments. If given,
3750
+ <var> processResponse</var> must be an algorithm accepting a <a for=/>response</a> . If given,
3751
+ <var> processResponseEndOfBody</var> must be an algorithm accepting a <a for=/>response</a> . If
3752
+ given, <var> processResponseConsumeBody</var> must be an algorithm accepting a <a for=/>response</a>
3753
+ and null, failure, or a <a for=/>byte sequence</a> .
3753
3754
3754
3755
<p> An ongoing <a for=/>fetch</a> can be
3755
3756
<dfn export for=fetch id=concept-fetch-terminate>terminated</dfn> with flag <var> aborted</var> ,
@@ -3804,8 +3805,8 @@ the request.
3804
3805
<var> processRequestBodyChunkLength</var> ,
3805
3806
<a for="fetch params">process request end-of-body</a> is <var> processRequestEndOfBody</var> ,
3806
3807
<a for="fetch params">process response</a> is <var> processResponse</var> ,
3808
+ <a for="fetch params">process response consume body</a> is <var> processResponseConsumeBody</var> ,
3807
3809
<a for="fetch params">process response end-of-body</a> is <var> processResponseEndOfBody</var> ,
3808
- <a for="fetch params">process response done</a> is <var> processResponseDone</var> ,
3809
3810
<a for="fetch params">task destination</a> is <var> taskDestination</var> , and
3810
3811
<a for="fetch params">cross-origin isolated capability</a> is
3811
3812
<var> crossOriginIsolatedCapability</var> .
@@ -4213,15 +4214,15 @@ steps:
4213
4214
</li>
4214
4215
4215
4216
<li>
4216
- <p> Let <var> processResponseDone </var> be the following steps:
4217
+ <p> Let <var> processResponseEndOfBody </var> be the following steps:
4217
4218
4218
4219
<ol>
4219
4220
<li><p> Set <var> fetchParams</var> 's <a for="fetch params">request</a>' s
4220
4221
<a for=request>done flag</a> .
4221
4222
4222
- <li><p> If <var> fetchParams</var> 's <a for="fetch params">process response done </a> is not null,
4223
- then <a>queue a fetch task</a> to run <var> fetchParams</var> 's
4224
- <a for="fetch params">process response done </a> given <var> response</var> with
4223
+ <li><p> If <var> fetchParams</var> 's <a for="fetch params">process response end-of-body </a> is not
4224
+ null, then <a>queue a fetch task</a> to run <var> fetchParams</var> 's
4225
+ <a for="fetch params">process response end-of-body </a> given <var> response</var> with
4225
4226
<var> fetchParams</var> 's <a for="fetch params">task destination</a> .
4226
4227
</ol>
4227
4228
</li>
@@ -4232,7 +4233,7 @@ steps:
4232
4233
<a for="fetch params">task destination</a> .
4233
4234
4234
4235
<li><p> If <var> response</var> 's <a for=response>body</a> is null, then run
4235
- <var> processResponseDone </var> .
4236
+ <var> processResponseEndOfBody </var> .
4236
4237
4237
4238
<li>
4238
4239
<p> Otherwise:</p>
@@ -4244,8 +4245,10 @@ steps:
4244
4245
<a for=TransformStream lt=enqueue>enqueues</a> <var> chunk</var> in <var> transformStream</var> .
4245
4246
4246
4247
<li><p> <a for=TransformStream lt="setting up">Set up</a> <var> transformStream</var> with
4247
- <a for="TransformStream/set up"><i>transformAlgorithm</i></a> set to <var> identityTransformAlgorithm</var> and
4248
- <a for="TransformStream/set up"><i>flushAlgorithm</i></a> set to <var> processResponseDone</var> .
4248
+ <a for="TransformStream/set up"><i>transformAlgorithm</i></a> set to
4249
+ <var> identityTransformAlgorithm</var> and
4250
+ <a for="TransformStream/set up"><i>flushAlgorithm</i></a> set to
4251
+ <var> processResponseEndOfBody</var> .
4249
4252
4250
4253
<li><p> Set <var> response</var> 's <a for=response>body</a> to the result of
4251
4254
<a for=ReadableStream lt="piping through">piping</a> <var> response</var> 's
@@ -4256,16 +4259,16 @@ steps:
4256
4259
the stream reaches its end, and is otherwise an <a>identity transform stream</a> .
4257
4260
4258
4261
<li>
4259
- <p> If <var> fetchParams</var> 's <a for="fetch params">process response end-of- body</a> is non-null,
4260
- then:
4262
+ <p> If <var> fetchParams</var> 's <a for="fetch params">process response consume body</a> is
4263
+ non-null, then:
4261
4264
4262
4265
<ol>
4263
4266
<li><p> Let <var> processBody</var> given <var> nullOrBytes</var> be this step: run
4264
- <var> fetchParams</var> 's <a for="fetch params">process response end-of- body</a> given
4267
+ <var> fetchParams</var> 's <a for="fetch params">process response consume body</a> given
4265
4268
<var> response</var> and <var> nullOrBytes</var> .
4266
4269
4267
4270
<li><p> Let <var> processBodyError</var> be this step: run <var> fetchParams</var> 's
4268
- <a for="fetch params">process response end-of- body</a> given <var> response</var> and failure.
4271
+ <a for="fetch params">process response consume body</a> given <var> response</var> and failure.
4269
4272
4270
4273
<li><p> If <var> response</var> 's <a for=response>body</a> is null, then <a>queue a fetch task</a>
4271
4274
to run <var> processBody</var> given null, with <var> fetchParams</var> 's
@@ -7582,7 +7585,7 @@ method steps are:
7582
7585
"<code> fetch</code> ".
7583
7586
7584
7587
<li>
7585
- <p> <a for=/>Fetch</a> <var> request</var> with <a for=fetch><i>processResponseDone </i></a> set to
7588
+ <p> <a for=/>Fetch</a> <var> request</var> with <a for=fetch><i>processResponseEndOfBody </i></a> set to
7586
7589
<var> handleFetchDone</var> , and <a for=fetch><i>processResponse</i></a> given <var> response</var>
7587
7590
being these substeps:
7588
7591
@@ -8032,6 +8035,11 @@ in a <a for=/>parallel queue</a> if <a for=fetch><i>useParallelQueue</i></a> is
8032
8035
<a for=response>body</a> 's <a for=body>stream</a> directly.
8033
8036
8034
8037
<dt> <a for=fetch><i>processResponseEndOfBody</i></a>
8038
+ <dd><p> Takes an algorithm that will be passed a <a for=/>response</a> . Indicates the network is
8039
+ done transmitting the response. This does not read <a for=/>response</a> 's
8040
+ <a for=response>body</a> .
8041
+
8042
+ <dt> <a for=fetch><i>processResponseConsumeBody</i></a>
8035
8043
<dd>
8036
8044
<p> Takes an algorithm that will be passed a <a for=/>response</a> and null, failure, or a
8037
8045
<a>byte sequence</a> . This is useful for standards that wish to operate on the entire
@@ -8056,11 +8064,6 @@ in a <a for=/>parallel queue</a> if <a for=fetch><i>useParallelQueue</i></a> is
8056
8064
<a for=response>body</a> itself as providing this argument will cause it to be read and it can be
8057
8065
read only once.
8058
8066
8059
- <dt> <a for=fetch><i>processResponseDone</i></a>
8060
- <dd><p> Takes an algorithm that will be passed a <a for=/>response</a> . Indicates the network is
8061
- done transmitting the response. This does not read <a for=/>response</a> 's
8062
- <a for=response>body</a> .
8063
-
8064
8067
<dt> <a for=fetch><i>useParallelQueue</i></a>
8065
8068
<dd><p> Takes a <a for=/>boolean</a> that defaults to false. Indicates where the algorithms passed
8066
8069
as arguments will be invoked. Hopefully most standards will not need this.
0 commit comments