[XML-SIG] SimpleXMLRPCServer Question
Mark Bucciarelli
mark@easymailings.com
Thu, 2 Jan 2003 14:20:41 -0500
On Thursday 02 January 2003 3:03 am, Martin v. L=F6wis wrote:
> Mark Bucciarelli <mark@easymailings.com> writes:
> > I think the 500 error is triggered because the statement
> >
> > data =3D self.rfile.read(int(self.headers["content-length"]))
> >
> > in the SimpleXMLRPCRequestHandler throws an exception.
>
> Care to report what that exception is?
I don't know what it is. The SimpleXMLRPCRequestHandler code is:
try:
=09data =3D self.rfile.read(...)
=09...
except:
=09# internal error, report as HTTP server error
=09self.send_response(500)
=09self.end_headers()
Anyway, I think this is where the 500 comes from.
[mark@pooh test]$ grep -l 'response(500)' /usr/lib/python2.2/*.py
/usr/lib/python2.2/SimpleXMLRPCServer.py
[mark@pooh test]$
> > So, is there some limit on the characters I can pass to an XMLRPC met=
hod?
>
> At a minimum, the bytes in the message must form valid characters
> according to the declared encoding. Remember that the default encoding
> of XML is UTF-8. Also remember that XML does not support binary data,
> and that XML-RPC supports the base64 element for that.
Great, I expect xmlrpclib.binary() will work just fine. Thanks.
Mark