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

Unified Diff: Source/core/loader/DocumentLoader.cpp

Issue 302543008: Reset DocumentLoader::m_request's method to GET for pushState and replaceState (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
Index: Source/core/loader/DocumentLoader.cpp
diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp
index 9be513565e329ce4fae54760ae71c2aa0b3ea3a2..f8033d4efd9a5ac902527d5eb327bc4d5f1fa90e 100644
--- a/Source/core/loader/DocumentLoader.cpp
+++ b/Source/core/loader/DocumentLoader.cpp
@@ -131,11 +131,15 @@ const KURL& DocumentLoader::url() const
return m_request.url();
}
-void DocumentLoader::updateForSameDocumentNavigation(const KURL& newURL)
+void DocumentLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDocumentNavigationSource sameDocumentNavigationSource)
{
KURL oldURL = m_request.url();
m_originalRequest.setURL(newURL);
m_request.setURL(newURL);
+ if (sameDocumentNavigationSource == SameDocumentNavigationHistoryApi) {
+ m_request.setHTTPMethod("GET");
+ m_request.setHTTPBody(nullptr);
+ }
clearRedirectChain();
if (m_isClientRedirect)
appendRedirect(oldURL);

Powered by Google App Engine
This is Rietveld 408576698