Index: Source/core/loader/DocumentLoader.cpp |
diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp |
index 4c92b95ab0f40677d34317a69679bb57f30984aa..e6eccb932a14fb15770c475d6a4af9426c79de81 100644 |
--- a/Source/core/loader/DocumentLoader.cpp |
+++ b/Source/core/loader/DocumentLoader.cpp |
@@ -346,11 +346,8 @@ void DocumentLoader::finishedLoading(double finishTime) |
clearMainResourceHandle(); |
} |
-bool DocumentLoader::isPostOrRedirectAfterPost(const ResourceRequest& newRequest, const ResourceResponse& redirectResponse) |
+bool DocumentLoader::isRedirectAfterPost(const ResourceRequest& newRequest, const ResourceResponse& redirectResponse) |
{ |
- if (newRequest.httpMethod() == "POST") |
- return true; |
- |
int status = redirectResponse.httpStatusCode(); |
if (((status >= 301 && status <= 303) || status == 307) |
&& m_originalRequest.httpMethod() == "POST") |
@@ -452,8 +449,7 @@ void DocumentLoader::willSendRequest(ResourceRequest& newRequest, const Resource |
// If we're fielding a redirect in response to a POST, force a load from origin, since |
// this is a common site technique to return to a page viewing some data that the POST |
// just modified. |
- // Also, POST requests always load from origin, but this does not affect subresources. |
- if (newRequest.cachePolicy() == UseProtocolCachePolicy && isPostOrRedirectAfterPost(newRequest, redirectResponse)) |
+ if (newRequest.cachePolicy() == UseProtocolCachePolicy && isRedirectAfterPost(newRequest, redirectResponse)) |
newRequest.setCachePolicy(ReloadIgnoringCacheData); |
Frame* parent = m_frame->tree()->parent(); |