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
This commit is contained in:
cxl 2018-08-20 07:22:16 +00:00
parent 450ceafb0f
commit 0fe27447df

View file

@ -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)