Index: third_party/WebKit/Source/core/frame/csp/CSPSource.cpp |
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp |
index 5be05dad47dd1f5708ded735ec26620edb5355a0..e2b6b18f6549815ae55cbc8133e560706f54c376 100644 |
--- a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp |
+++ b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp |
@@ -39,6 +39,10 @@ bool CSPSource::schemeMatches(const KURL& url) const |
{ |
if (m_scheme.isEmpty()) |
return m_policy->protocolMatchesSelf(url); |
+ if (equalIgnoringCase(m_scheme, "http")) |
+ return equalIgnoringCase(url.protocol(), "http") || equalIgnoringCase(url.protocol(), "https"); |
+ if (equalIgnoringCase(m_scheme, "ws")) |
+ return equalIgnoringCase(url.protocol(), "ws") || equalIgnoringCase(url.protocol(), "wss"); |
return equalIgnoringCase(url.protocol(), m_scheme); |
} |