Re: [whatwg/fetch] Add chunk type checking of requestForServiceWorker's body's stream (#1199)

@annevk commented on this pull request.

Looks good to me modulo nits. Is everyone else happy with this as well. @ricea?

> +
+       <li><p>If <var>chunk</var> is not a {{Uint8Array}} object, then
+       <a lt=terminated for=fetch>terminate</a> the ongoing fetch.
+
+       <li><p>Otherwise, <a for=ReadableStream>enqueue</a> <var>chunk</var>. The user agent may
+       split the chunk into <a>implementation-defined</a> practical sizes and
+       <a for=ReadableStream>enqueue</a> each of them. The user agent also may concatenate the
+       chunks into an <a>implementation-defined</a> practical size and
+       <a for=ReadableStream>enqueue</a> it.
+      </ol>
+
+     <li><p>Let <var>transformStream</var> be the result of <a for=TransformStream>setting up</a> a
+     {{TransformStream}} with <var>transformAlgorithm</var>.
+
+     <li><p>Let <var>transformedStream</var> be the result of <var>requestForServiceWorker</var>'s
+     <a for=/>body</a>'s stream <a for=ReadableStream>piped through</a> <var>transformStream</var>.

Need to xref stream here.

> +       <a lt=terminated for=fetch>terminate</a> the ongoing fetch.
+
+       <li><p>Otherwise, <a for=ReadableStream>enqueue</a> <var>chunk</var>. The user agent may
+       split the chunk into <a>implementation-defined</a> practical sizes and
+       <a for=ReadableStream>enqueue</a> each of them. The user agent also may concatenate the
+       chunks into an <a>implementation-defined</a> practical size and
+       <a for=ReadableStream>enqueue</a> it.
+      </ol>
+
+     <li><p>Let <var>transformStream</var> be the result of <a for=TransformStream>setting up</a> a
+     {{TransformStream}} with <var>transformAlgorithm</var>.
+
+     <li><p>Let <var>transformedStream</var> be the result of <var>requestForServiceWorker</var>'s
+     <a for=/>body</a>'s stream <a for=ReadableStream>piped through</a> <var>transformStream</var>.
+
+     <li><p>Set <var>requestForServiceWorker</var>'s <a for=/>body</a>'s stream to

Need to xref stream here.

-- 
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/1199#pullrequestreview-634816777

Received on Tuesday, 13 April 2021 16:58:00 UTC