mirror of
https://github.com/python/cpython.git
synced 2025-10-13 10:23:28 +00:00
bpo-43433: Preserve query and fragment in the URL of the server in ServerProxy. (GH-25057)
This commit is contained in:
parent
70cdf1812c
commit
c1b073a630
3 changed files with 45 additions and 3 deletions
|
@ -1421,11 +1421,13 @@ class ServerProxy:
|
|||
# establish a "logical" server connection
|
||||
|
||||
# get the url
|
||||
p = urllib.parse.urlparse(uri)
|
||||
p = urllib.parse.urlsplit(uri)
|
||||
if p.scheme not in ("http", "https"):
|
||||
raise OSError("unsupported XML-RPC protocol")
|
||||
self.__host = p.netloc
|
||||
self.__handler = p.path or "/RPC2"
|
||||
self.__handler = urllib.parse.urlunsplit(["", "", *p[2:]])
|
||||
if not self.__handler:
|
||||
self.__handler = "/RPC2"
|
||||
|
||||
if transport is None:
|
||||
if p.scheme == "https":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue