396c2417d9
When Cache.put() is called with a Response, it consumes the response. If the Response is used for any other purpose (such as satisfying the original FetchEvent) it must be cloned first. A bug exists in the mocks used for SW tests, where this condition is not validated. The bodies of MockResponses can be utilized repeatedly without erroring in the same way that a real browser would. This bug is fixed by this commit, which causes tests for the freshness strategy of data caching to start failing. The cause of this failure is a second bug in the data caching code, where the Response is not cloned prior to being passed to Cache.put(). This is also fixed. PR Close #19764 |
||
---|---|---|
.. | ||
cli | ||
config | ||
src | ||
test | ||
testing | ||
worker | ||
build.sh | ||
package.json | ||
public_api.ts | ||
rollup.config.js | ||
tsconfig-build.json |