[issue7093] xmlrpclib.ServerProxy() doesn't support unicode uri

2010-09-10 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: fixed -> wont fix

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7093] xmlrpclib.ServerProxy() doesn't support unicode uri

2010-09-10 Thread STINNER Victor

STINNER Victor  added the comment:

Well, it was trivial to workaround this bug in my application (convert host to 
bytes using explicit host = str(host)). Python3 doesn't have this issue and 
Python 2.7 is released, I prefer to close this bug as wont fix.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7093] xmlrpclib.ServerProxy() doesn't support unicode uri

2009-10-09 Thread STINNER Victor

STINNER Victor  added the comment:

Hum, it looks that the issue is not on ServerProxy.__host, but on
ServerProxy.__handler. That's why my test uses "http://host:port/RPC2"; instead
of "http://host:port";. In the second case, the handler is set to the default 
value:
"/RPC2" which is str (and not unicode).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7093] xmlrpclib.ServerProxy() doesn't support unicode uri

2009-10-09 Thread STINNER Victor

New submission from STINNER Victor :

I backported xmlrpclib from Python trunk to Python 2.5 to get "connected
socket" (HTTP/1.1), which implies to backport also httplib, ssl and socket. It
works well. It's *much* faster, eg. 960 ms => 70 ms with HTTPS over a VPN.

I just have a little issue: if ServerProxy() URI is an unicode string and an
argument is an unicode string (with at least one non-ASCII character), the
request fails with:

  File ".../SVN/python-trunk/Lib/httplib.py", line 784, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 320:
ordinal not in range(128)

Attached patch includes a test.

Can uri contains a login and/or pasword? If yes, should it be encoded to UTF-8
(instead of ASCII)?

--
components: Library (Lib)
files: xmlrpclib_unicode_host.patch
keywords: patch
messages: 93798
nosy: haypo
severity: normal
status: open
title: xmlrpclib.ServerProxy() doesn't support unicode uri
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15093/xmlrpclib_unicode_host.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com