From 0fe27447df6e4ace8e5c6cd165b44ebd1c0a4547 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 20 Aug 2018 07:22:16 +0000 Subject: [PATCH] Core: WebSocket GET url now http/https instead of ws/wss git-svn-id: svn://ultimatepp.org/upp/trunk@12175 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/WebSocket.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uppsrc/Core/WebSocket.cpp b/uppsrc/Core/WebSocket.cpp index 0815be40f..4d3a2b1f6 100644 --- a/uppsrc/Core/WebSocket.cpp +++ b/uppsrc/Core/WebSocket.cpp @@ -89,7 +89,9 @@ bool WebSocket::Connect(const String& url) if(*u == ':') port = ScanInt(u + 1, &u); - return Connect(url, host, ssl, port); + return Connect(url.StartsWith("wss:") ? "https:" + url.Mid(4) + : url.StartsWith("ws:") ? "http:" + url.Mid(3) : url, + host, ssl, port); } bool WebSocket::Connect(const String& uri_, const String& host_, bool ssl_, int port)