[issue7727] xmlrpc library returns string which contain null ( \x00 )

Martin v. Löwis report at bugs.python.org
Wed May 22 13:28:09 CEST 2013


Martin v. Löwis added the comment:

The original report really includes two parts:
a) when a string containing \0 is marshalled, ill-formed XML is produced
b) the expected behavior is that base64 is used

IMO: While a) is correct, b) is not. Antoine is correct that xmlrpclib.Binary should be used if you want to transmit binary data. Consequently, an Error should be reported if an attempt is made to produce ill-formed XML.

OTOH, ill-formed XML can also be produced when sending a byte string that does not match the encoding declaration. Because of that, I propose to close this by documentating the limitations, rather than changing the code.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7727>
_______________________________________


More information about the Python-bugs-list mailing list