[mod_python] XML-RPC?

Manfred Stienstra manfred.stienstra at dwerg.net
Sun Feb 29 23:55:06 EST 2004


On Sun, 2004-02-29 at 23:26, Michael wrote:
> >>Having looked further at this it seems to be caused any time
> >>
> >>xmlrpclib.loads() is used inside a mod_python handler. Even when the 
> >>data being sent to loads() isn't being read() from the client. The same 
> >>code ran from the command line does not raise an error. I can run the 
> >>code with mod_python imported though. Is there some bad interaction 
> >>between Apache, mod_python, and xmlrpclib (or prehaps one of it's parsers)
> >
> >Can you please post the error?
> >
> INPUT
> --------
> POST /mike.py HTTP/1.0
> User-Agent: None
> Host: kavlon.org
> Content-Type: text/xml
> Content-length: 117
> 
> <methodCall><methodName>test</methodName>
> <params><param><value><int>41</int></value></param></params></methodCall>
> 
> 
> 
> OUTPUT
> -----------
> HTTP/1.1 200 OK
> Date: Sun, 29 Feb 2004 22:23:37 GMT
> Server: Apache/1.3.29 (Unix) mod_python/2.7.8 Python/2.3.2 PHP/4.3.4
> Connection: close
> Content-Type: text/xml
> 
> 
> Mod_python error: "PythonHandler mike"
> 
> Traceback (most recent call last):
> 
>   File "/usr/local/lib/python2.3/site-packages/mod_python/apache.py", 
> line 193,
> in Dispatch
>     result = object(req)
> 
>   File "/home/webserver/localhost/mike.py", line 12, in handler
>     params, method = xmlrpclib.loads ( req.read () )
> 
>   File "/usr/local/lib/python2.3/xmlrpclib.py", line 1014, in loads
>     return u.close(), u.getmethodname()
> 
>   File "/usr/local/lib/python2.3/xmlrpclib.py", line 740, in close
>     raise ResponseError()
> 
> ResponseError: <xmlrpclib.ResponseError instance at 0x4069324c>


The error appears to come from the Unmarshaller, so I guess you will
have to hack into that to figure out what goes wrong...

Manfred



More information about the Mod_python mailing list