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); |
} |