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

@annevk commented on this pull request.



> +    <ol>
+     <li> Let <var>transformAlgorithm</var> given <var>chunk</var> be these steps:
+      <ol>
+        <li><p>If the ongoing fetch is <a for=fetch>terminated</a>, then abort these steps.
+
+        <li><p>If <var>chunk</var> is not a {{Uint8Array}} object, then
+         <a lt=terminated for=fetch>terminate</a> the ongoing fetch.
+
+        <li>Otherwise, <a for=ReadableStream>enqueue</a> <var>chunk</var>. The user agent may split
+         the chunk and enqueues multiple times.
+      </ol>
+
+     <li> Let <var>transformStream</var> be result of <a for=TransformStream>creating</a> a
+      {{TransformStream}} with <var>transformAlgorithm</var>.
+
+     <li> Let <var>streamForServiceWorker</var> be result of pipeThrough

We cannot use that as that's the public API. @ricea might be able to help 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#discussion_r597477240

Received on Friday, 19 March 2021 08:10:50 UTC