Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: net/http/http_cache_transaction.cc

Issue 2508473002: [DevTools] Properly handle cache-only requests when cache is disabled (Closed)
Patch Set: Fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 3ab072787cf9d9f73c8d8cde49919c60ec027424..864395529a42415db98491b312733c17b8ba55ec 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -902,6 +902,10 @@ int HttpCache::Transaction::DoGetBackendComplete(int result) {
// Requested cache access mode.
if (effective_load_flags_ & LOAD_ONLY_FROM_CACHE) {
+ if (effective_load_flags_ & LOAD_BYPASS_CACHE) {
+ // The client has asked for nonsense.
+ return ERR_CACHE_MISS;
+ }
mode_ = READ;
} else if (effective_load_flags_ & LOAD_BYPASS_CACHE) {
mode_ = WRITE;

Powered by Google App Engine
This is Rietveld 408576698