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

Unified Diff: net/http/http_cache_transaction.cc

Issue 670183003: Update from chromium 62675d9fb31fb8cedc40f68e78e8445a74f362e7 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 months 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
« no previous file with comments | « net/base/sdch_manager_unittest.cc ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 5441e90f33ffa7d27377bb07dac4a67ab954338c..c39a38a77a0b6d9ef0f8a68eb1b04dd086e7db58 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1208,6 +1208,7 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() {
UpdateTransactionPattern(PATTERN_ENTRY_NOT_CACHED);
}
+ // Invalidate any cached GET with a successful PUT or DELETE.
if (mode_ == WRITE &&
(request_->method == "PUT" || request_->method == "DELETE")) {
if (NonErrorResponse(new_response->headers->response_code())) {
@@ -1219,7 +1220,9 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() {
mode_ = NONE;
}
- if (request_->method == "POST" &&
+ // Invalidate any cached GET with a successful POST.
+ if (!(effective_load_flags_ & LOAD_DISABLE_CACHE) &&
+ request_->method == "POST" &&
NonErrorResponse(new_response->headers->response_code())) {
cache_->DoomMainEntryForUrl(request_->url);
}
« no previous file with comments | « net/base/sdch_manager_unittest.cc ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698