Commit ece48660 authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot

Do no use AppCache after a successful 304 response.

This is a continuation of:
https://chromium-review.googlesource.com/c/chromium/src/+/1503133/5
where the condition before running |MaybeCreateLoaderForResponse| was
removed by mistake. This restores the condition and adds an
explanation about why it is useful.

Bug: 873269
Change-Id: Ieda17fca7baacfeec00468e01eb67332802ee905
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1505938Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638180}
parent 579432c8
......@@ -1331,11 +1331,17 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
GetCertificateChainsSizeInKB(status.ssl_info.value()));
}
// If the default loader (network) was used to handle the URL load
// request we need to see if the interceptors want to potentially create a
// new loader for the response. e.g. AppCache.
if (MaybeCreateLoaderForResponse(network::ResourceResponseHead()))
// If the default loader (network) was used to handle the URL load request
// we need to see if the interceptors want to potentially create a new
// loader for the response. e.g. AppCache.
//
// Note: Despite having received a response, the HTTP_NOT_MODIFIED(304) ones
// are ignored using OnComplete(net::ERR_ABORTED). No interceptor must
// be used in this case.
if (!received_response_ &&
MaybeCreateLoaderForResponse(network::ResourceResponseHead())) {
return;
}
status_ = status;
base::PostTaskWithTraits(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment