Skip to content

Commit

Permalink
http-cache: remove double-store of resources
Browse files Browse the repository at this point in the history
  • Loading branch information
gterzian committed Jun 19, 2019
1 parent 4f41065 commit 049817c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions components/net/http_loader.rs
Expand Up @@ -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
Expand Down

0 comments on commit 049817c

Please sign in to comment.