
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
Safari (7+), iOS (7+) and IE mobile (11) are tested on BrowserStack.
Angular
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript and other languages.
Quickstart
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
86.3%
JavaScript
8.5%
HTML
1.8%
Starlark
1.7%
CSS
1%
Other
0.6%