[Twisted-Python] Anomaly found between twisted XML-RPC client and twisted server (Bug?)

Wari Wahab wari at home.wari.org
Thu May 22 22:19:26 MDT 2003


Wari Wahab wrote:

> I tried the previously mentioned tests in linux, python 2.2.2 and 
> twisted 1.0.5, I tried the same tests now in WindowsXP with 
> Activestate Python and Twisted 1.0.5 and I get the same errors and 
> results as well, which means that this bug is reproducable. 

Right now I'm not sure if this is a bug anymore, and it's probably the 
reason I got no answers for this, details below.

> Why can't twisted xmlrpc client talk to twisted xmlrpc server?

When I did this statement:

p = Proxy('http://localhost:7080')
p.callRemote(egg, spam)

Twisted then sends the request:
---------------
POST  HTTP/1.0
User-Agent: Twisted/XMLRPClib
Host: localhost
Content-type: text/xml
Content-length: 189

<?xml version="1.0"?>
<methodCall>
<methodName>add</methodName>
# Blah Blah
----------------

"POST  HTTP/1.0" becomes an invalid request because there's no path 
anyway. Still, the twisted xmlrpc server carries forward the request to 
twisted.web.xmlrpc.XMLRPC.render() anyway, but this time, the 
request.content (line 103 in xmlrpc.py) is an empty StringIO, and when 
passed to xmlrpc.loads(), returns the exception.

If the request is wrong, shouldn't twisted.web complain about it at a 
point earlier than the XMLRPC resource? If it lets the request thru, why 
does request.content becomes empty. Or, shouldn't the XMLRPC client adds 
a '/' at least when there is no URI (URL?) in the request?

That's all for now.





More information about the Twisted-Python mailing list