http-cache: remove double-store of resources

This commit is contained in:
Gregory Terzian 2019-06-19 05:25:32 -07:00
parent 4f41065dfb
commit 049817c5a7

View file

@ -1382,12 +1382,7 @@ fn http_network_fetch(
// Step 13
// TODO this step isn't possible yet (CSP)
// Step 14
if !response.is_network_error() && request.cache_mode != CacheMode::NoStore {
if let Ok(mut http_cache) = context.state.http_cache.write() {
http_cache.store(&request, &response);
}
}
// Step 14, update the cached response, done via the shared response body.
// TODO this step isn't possible yet
// Step 15