Created
June 5, 2012 20:34
-
-
Save fischman/2877666 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Source/WebKit/chromium/src/AssociatedURLLoader.cpp b/Source/WebKit/chromium/src/AssociatedURLLoader.cpp | |
index f1c2aab..e466f4d 100644 | |
--- a/Source/WebKit/chromium/src/AssociatedURLLoader.cpp | |
+++ b/Source/WebKit/chromium/src/AssociatedURLLoader.cpp | |
@@ -32,6 +32,7 @@ | |
#include "AssociatedURLLoader.h" | |
#include "CrossOriginAccessControl.h" | |
+#include "Document.h" | |
#include "DocumentThreadableLoader.h" | |
#include "DocumentThreadableLoaderClient.h" | |
#include "HTTPValidation.h" | |
@@ -346,8 +347,10 @@ void AssociatedURLLoader::loadAsynchronously(const WebURLRequest& request, WebUR | |
options.crossOriginRequestPolicy = static_cast<WebCore::CrossOriginRequestPolicy>(m_options.crossOriginRequestPolicy); | |
options.shouldBufferData = DoNotBufferData; | |
- const ResourceRequest& webcoreRequest = newRequest.toResourceRequest(); | |
+ ResourceRequest& webcoreRequest = newRequest.toMutableResourceRequest(); | |
Document* webcoreDocument = m_frameImpl->frame()->document(); | |
+ if (options.crossOriginRequestPolicy == WebCore::UseAccessControl) | |
+ updateRequestForAccessControl(webcoreRequest, webcoreDocument->securityOrigin(), options.allowCredentials); | |
m_loader = DocumentThreadableLoader::create(webcoreDocument, m_clientAdapter.get(), webcoreRequest, options); | |
} else { | |
// FIXME: return meaningful error codes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment