New submission from Julien Castiaux <[email protected]>:
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
----------
components: Library (Lib)
messages: 387730
nosy: Julien Castiaux
priority: normal
severity: normal
status: open
title: xmlrpc.Server URI query and fragment are discarded from HTTP query since
py3
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43330>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com