Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scheme = parsed.scheme
- if scheme == 'http': scheme = 'ws'
- is_secure = False
- if scheme == "ws":
- if not port:
- port = 80
- elif scheme == "wss":
- is_secure = True
- if not port:
- port = 443
- else:
- raise ValueError("scheme %s is invalid" % scheme)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement