Index: Source/modules/websockets/DOMWebSocket.cpp |
diff --git a/Source/modules/websockets/DOMWebSocket.cpp b/Source/modules/websockets/DOMWebSocket.cpp |
index 7b768003dd1df6d1d9d4c3e1130275623bb52c4c..cfdbfbbf0ffad4aced1582d2b1bf757713ac3272 100644 |
--- a/Source/modules/websockets/DOMWebSocket.cpp |
+++ b/Source/modules/websockets/DOMWebSocket.cpp |
@@ -52,7 +52,6 @@ |
#include "platform/Logging.h" |
#include "platform/blob/BlobData.h" |
#include "platform/heap/Handle.h" |
-#include "platform/weborigin/KnownPorts.h" |
#include "platform/weborigin/SecurityOrigin.h" |
#include "public/platform/Platform.h" |
#include "wtf/Assertions.h" |
@@ -303,7 +302,8 @@ void DOMWebSocket::connect(const String& url, const Vector<String>& protocols, E |
exceptionState.throwDOMException(SyntaxError, "The URL contains a fragment identifier ('" + m_url.fragmentIdentifier() + "'). Fragment identifiers are not allowed in WebSocket URLs."); |
return; |
} |
- if (!portAllowed(m_url)) { |
+ |
+ if (!Platform::current()->portAllowed(m_url.port(), m_url.protocolIs("ftp"))) { |
eroman
2015/04/10 01:55:56
A couple things here:
(1) It is weird to be cal
Paritosh Kumar
2015/04/10 12:52:35
Updated in new CL.
|
m_state = CLOSED; |
exceptionState.throwSecurityError("The port " + String::number(m_url.port()) + " is not allowed."); |
return; |