Re: [ServiceWorker] Backpressure on fetch integrated with Streams (#452)

cache.put() checks to see if bodyUsed is set on both Request and Response.  If either is true, then it rejects.

cache.put() will also set bodyUsed on both Request and Response if there is a body to read.

So yes, currently, cache expects no bytes to have been read before the put().  I can't think of any implementation reason why we couldn't allow a partial body to be written, but it might be a big footgun for developers.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/452#issuecomment-70783239

Received on Wednesday, 21 January 2015 04:35:17 UTC