This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: xmlrpc.Server URI query and fragment are discarded from HTTP query since py3
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: drlazor8
Priority: normal Keywords: patch

Created on 2021-02-26 17:02 by drlazor8, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24683 closed drlazor8, 2021-03-01 11:22
PR 25057 drlazor8, 2021-04-01 00:57
Messages (2)
msg387730 - (view) Author: Julien Castiaux (drlazor8) * Date: 2021-02-26 17:02
Hello,

There is a backward incompatibility between xmlrpc.client and xmlrpclib in server classes about how the URI is parsed and used to connect to the remote server. While py2's xmlrpclib use the path, query and fragment parts of the URI request the server, py3's xmlrpc.client solely uses the path and discard both the query and the fragment parts.

In the ProxyServer init method, py2 xmlrpclib does the following to extract the URI:

    def __init__(self, uri, transport=None, encoding=None, verbose=0,
                 allow_none=0, use_datetime=0, context=None):
        import urllib
        type, uri = urllib.splittype(uri)
        self.__host, self.__handler = urllib.splithost(uri)
        if not self.__handler:
            self.__handler = "/RPC2"

While in ProxyServer init method, py3 xmlrpc.client does the following:

    def __init__(self, uri, transport=None, encoding=None, verbose=False,
                 allow_none=False, use_datetime=False, use_builtin_types=False,
                 *, headers=(), context=None):
        p = urllib.parse.urlparse(uri)
        self.__host = p.netloc
        self.__handler = p.path or "/RPC2"

A Pull Request is coming shortly
msg389944 - (view) Author: Julien Castiaux (drlazor8) * Date: 2021-04-01 00:57
Duplicate of 43433
History
Date User Action Args
2022-04-11 14:59:42adminsetgithub: 87496
2021-04-01 00:57:31drlazor8setstatus: open -> closed

resolution: duplicate
messages: + msg389944
pull_requests: + pull_request23871
2021-03-01 11:22:03drlazor8setkeywords: + patch
stage: patch review
pull_requests: + pull_request23467
2021-02-26 17:02:19drlazor8create