Message143680
This is a similar issue to http://bugs.python.org/issue7093, but more insiduous:
This works:
xmlrpclib.ServerProxy(u'http://localhost:8080').foo(dict(baz=u'bär'))
While this fails with a UnicodeDecodeError (note the trailing slash in the URI):
xmlrpclib.ServerProxy(u'http://localhost:8080/').foo(dict(baz=u'bär'))
File "/usr/local/python2.7/lib/python2.7/httplib.py", line 937, in endheaders
self._send_output(message_body)
File "/usr/local/python2.7/lib/python2.7/httplib.py", line 795, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 139: ordinal not in range(128)
So, somewhere in xmlrpclib, confusion happens, since even though the URI is passed in as unicode both times, it is stored as string in the first case (thus compatible with the serialized, utf-8 encoded string of the message body), but in the second case it remains unicode (thus failing, as #7093 tells, which I personally wouldn't have closed wontfix). |
|
Date |
User |
Action |
Args |
2011-09-07 14:30:07 | wosc | set | recipients:
+ wosc |
2011-09-07 14:30:07 | wosc | set | messageid: <1315405807.49.0.456740277996.issue12931@psf.upfronthosting.co.za> |
2011-09-07 14:30:06 | wosc | link | issue12931 messages |
2011-09-07 14:30:06 | wosc | create | |
|