Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Lib/xmlrpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,15 +1421,14 @@ def __init__(self, uri, transport=None, encoding=None, verbose=False,
# establish a "logical" server connection

# get the url
type, uri = urllib.parse._splittype(uri)
if type not in ("http", "https"):
p = urllib.parse.urlparse(uri)
if p.scheme not in ("http", "https"):
raise OSError("unsupported XML-RPC protocol")
self.__host, self.__handler = urllib.parse._splithost(uri)
if not self.__handler:
self.__handler = "/RPC2"
self.__host = p.netloc
self.__handler = p.path or "/RPC2"

if transport is None:
if type == "https":
if p.scheme == "https":
handler = SafeTransport
extra_kwargs = {"context": context}
else:
Expand Down