Commit 9c4c459a authored by Dong-hee Na's avatar Dong-hee Na Committed by Serhiy Storchaka

bpo-38038: Remove urllib.parse._splittype from xmlrpc.client. (GH-15703)

parent 32f82539
...@@ -1421,15 +1421,14 @@ class ServerProxy: ...@@ -1421,15 +1421,14 @@ class ServerProxy:
# establish a "logical" server connection # establish a "logical" server connection
# get the url # get the url
type, uri = urllib.parse._splittype(uri) p = urllib.parse.urlparse(uri)
if type not in ("http", "https"): if p.scheme not in ("http", "https"):
raise OSError("unsupported XML-RPC protocol") raise OSError("unsupported XML-RPC protocol")
self.__host, self.__handler = urllib.parse._splithost(uri) self.__host = p.netloc
if not self.__handler: self.__handler = p.path or "/RPC2"
self.__handler = "/RPC2"
if transport is None: if transport is None:
if type == "https": if p.scheme == "https":
handler = SafeTransport handler = SafeTransport
extra_kwargs = {"context": context} extra_kwargs = {"context": context}
else: else:
......
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