Re: [whatwg/fetch] Fail request when its streaming body is used in ServiceWorker (#1144)

@annevk commented on this pull request.



> @@ -3834,9 +3834,32 @@ optional <i>CORS-preflight flag</i>, run these steps:
   <p>If <var>request</var>'s <a>service-workers mode</a> is "<code>all</code>", then:
 
   <ol>
+   <li><p>Assert: <var>request</var> 's <a for=request>body</a> is either null or a
+   <a for=/>body</a>.
+
+   <li>
+    <p>Let <var>savedBody</var> be a copy of <var>request</var>'s <a for=request>body</a>.

Thanks, I suspect we need to do something similar for passthrough stuff (though probably transfer instead). If the service worker doesn't touch a request with a stream, we do need to transfer it somehow as otherwise the service worker could later try to read from it. I don't think the service worker cloning it but not doing anything else should trigger any weird side effects.

-- 
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/1144#discussion_r570218041

Received on Thursday, 4 February 2021 13:23:05 UTC