Commit 1214e8e0 authored by Philipp Hörist's avatar Philipp Hörist

Be more strict with websocket uri detection

parent 65a6ce43
......@@ -1754,7 +1754,7 @@ def get_custom_host(account):
type_ = app.config.get_per('accounts', account, 'custom_type')
protocol = ConnectionProtocol.TCP
if host.startswith('ws'):
if host.startswith('ws://') or host.startswith('wss://'):
protocol = ConnectionProtocol.WEBSOCKET
return ('%s:%s' % (host, port),
......
......@@ -699,7 +699,7 @@ def get_custom_host(self):
con_type = self._ui.con_type_combo.get_active_text()
protocol = ConnectionProtocol.TCP
if host.startswith('ws'):
if host.startswith('ws://') or host.startswith('wss://'):
protocol = ConnectionProtocol.WEBSOCKET
return ('%s:%s' % (host, port),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment