Index: content/browser/renderer_host/resource_dispatcher_host.cc |
diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc |
index f39d36465d68a243d1284793f3302fe30ab78758..3d9006dae4d9a6ca92c8ef679af126f8dae87559 100644 |
--- a/content/browser/renderer_host/resource_dispatcher_host.cc |
+++ b/content/browser/renderer_host/resource_dispatcher_host.cc |
@@ -893,7 +893,14 @@ net::Error ResourceDispatcherHost::BeginDownload( |
request->set_context(request_context); |
int extra_load_flags = net::LOAD_IS_DOWNLOAD; |
if (prefer_cache) { |
- extra_load_flags |= net::LOAD_PREFERRING_CACHE; |
+ // If there is upload data attached, only retrieve from cache because there |
+ // is no current mechanism to prompt the user for their consent for a |
+ // re-post. For GETs, try to retrieve data from the cache and skip |
+ // validating the entry if present. |
+ if (request->get_upload() != NULL) |
+ extra_load_flags |= net::LOAD_ONLY_FROM_CACHE; |
+ else |
+ extra_load_flags |= net::LOAD_PREFERRING_CACHE; |
} else { |
extra_load_flags |= net::LOAD_DISABLE_CACHE; |
} |