Index: Source/core/fetch/CrossOriginAccessControl.cpp |
diff --git a/Source/core/fetch/CrossOriginAccessControl.cpp b/Source/core/fetch/CrossOriginAccessControl.cpp |
index f35116c73f8768f9ab7137e1e2cf66ed28278cf6..33a60d0ae78ebceab697275e4e97fdd959c3f6ff 100644 |
--- a/Source/core/fetch/CrossOriginAccessControl.cpp |
+++ b/Source/core/fetch/CrossOriginAccessControl.cpp |
@@ -102,7 +102,7 @@ void updateRequestForAccessControl(ResourceRequest& request, SecurityOrigin* sec |
request.setAllowCookies(allowCredentials == AllowStoredCredentials); |
if (securityOrigin) |
- request.setHTTPOrigin(securityOrigin->toString()); |
+ request.setHTTPOrigin(securityOrigin->toAtomicString()); |
} |
ResourceRequest createAccessControlPreflightRequest(const ResourceRequest& request, SecurityOrigin* securityOrigin) |
@@ -127,7 +127,7 @@ ResourceRequest createAccessControlPreflightRequest(const ResourceRequest& reque |
headerBuffer.append(it->key); |
} |
- preflightRequest.setHTTPHeaderField("Access-Control-Request-Headers", headerBuffer.toString().lower()); |
+ preflightRequest.setHTTPHeaderField("Access-Control-Request-Headers", AtomicString(headerBuffer.toString().lower())); |
} |
return preflightRequest; |
@@ -149,7 +149,7 @@ bool passesAccessControlCheck(const ResourceResponse& response, StoredCredential |
if (accessControlOriginString == starAtom && includeCredentials == DoNotAllowStoredCredentials) |
return true; |
- if (accessControlOriginString != securityOrigin->toString()) { |
+ if (accessControlOriginString != securityOrigin->toAtomicString()) { |
if (accessControlOriginString == starAtom) { |
errorDescription = "A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin '" + securityOrigin->toString() + "' is therefore not allowed access."; |
} else if (accessControlOriginString.isEmpty()) { |