- From: Noam Rosenthal <notifications@github.com>
- Date: Tue, 07 Dec 2021 04:42:02 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/1311/review/825220525@github.com>
@noamr commented on this pull request. > + <li><p>Let <var>transformStream</var> be a new a {{TransformStream}}. + + <li><p>Let <var>identityTransformAlgorithm</var> be an algorithm which, given <var>chunk</var>, + <a for=TransformStream lt=enqueue>enqueues</a> <var>chunk</var> in <var>transformStream</var>. + + <li><p><a for=TransformStream lt="setting up">Set up</a> <var>transformStream</var> with + [=TransformStream/set up/transformalgorithm=] set to <var>identityTransformAlgorithm</var> and + [=TransformStream/set up/flushalgorithm=] set to <var>processResponseDone</var>. + + <li><p>Set <var>response</var>'s <a for=response>body</a> to the result of + <a for=ReadableStream lt="piping through">piping</a> <var>response</var>'s + <a for=response>body</a> through <var>transformStream</var>. + </ol> + + <p class=note>This {{TransformStream}} is needed for the purpose of receiving a notification when + the stream reaches its end, and is otherwise an [=identity transform stream=]. Done > @@ -4219,26 +4277,16 @@ steps: <var>processBody</var>, <var>processBodyError</var>, and <var>fetchParams</var>'s <a for="fetch params">task destination</a>. </ol> -</ol> - -<p>To <dfn>finalize response</dfn> given a <a for=/>fetch params</a> <var>fetchParams</var> and a -<a for=/>response</a> <var>response</var>, run these steps: - -<ol> - <li><p>Set <var>fetchParams</var>'s <a for="fetch params">request</a>'s - <a for=request>done flag</a>. - - <li><p>If <var>fetchParams</var>'s <a for="fetch params">process response done</a> is not null, - then <a>queue a fetch task</a> to run <var>fetchParams</var>'s - <a for="fetch params">process response done</a> given <var>response</var>, - with <var>fetchParams</var>'s <a for="fetch params">task destination</a>. + </li> Done > + + <li><p>Let <var>identityTransformAlgorithm</var> be an algorithm which, given <var>chunk</var>, + <a for=TransformStream lt=enqueue>enqueues</a> <var>chunk</var> in <var>transformStream</var>. + + <li><p><a for=TransformStream lt="setting up">Set up</a> <var>transformStream</var> with + [=TransformStream/set up/transformalgorithm=] set to <var>identityTransformAlgorithm</var> and + [=TransformStream/set up/flushalgorithm=] set to <var>processResponseDone</var>. + + <li><p>Set <var>response</var>'s <a for=response>body</a> to the result of + <a for=ReadableStream lt="piping through">piping</a> <var>response</var>'s + <a for=response>body</a> through <var>transformStream</var>. + </ol> + + <p class=note>This {{TransformStream}} is needed for the purpose of receiving a notification when + the stream reaches its end, and is otherwise an [=identity transform stream=]. + </li> Done > + <li> + <p>Let <var>processResponseDone</var> be the following steps: + + <ol> + <li><p>Set <var>fetchParams</var>'s <a for="fetch params">request</a>'s + <a for=request>done flag</a>. + + <li><p>If <var>fetchParams</var>'s <a for="fetch params">process response done</a> is not null, + then <a>queue a fetch task</a> to run <var>fetchParams</var>'s + <a for="fetch params">process response done</a> given <var>response</var> with + <var>fetchParams</var>'s <a for="fetch params">task destination</a>. + </ol> + </li> + + <li><p>If <var>response</var>'s <a for=response>body</a> is null, then run + <var>processResponseDone</var>. Sure, will re-order -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/pull/1311#discussion_r763954223
Received on Tuesday, 7 December 2021 12:42:15 UTC