Adding support for WebSocket over SSL (wss://)

This commit is contained in:
Miroslav Stampar
2019-06-06 23:45:30 +02:00
parent 8a97e7edcc
commit 02c8f47892
3 changed files with 9 additions and 6 deletions

View File

@@ -346,8 +346,8 @@ class Connect(object):
pass
elif target:
if conf.forceSSL and _urllib.parse.urlparse(url).scheme != "https":
url = re.sub(r"(?i)\Ahttp:", "https:", url)
if conf.forceSSL:
url = re.sub(r"(?i)\A(http|ws):", r"\g<1>s:", url)
url = re.sub(r"(?i):80/", ":443/", url)
if PLACE.GET in conf.parameters and not get: