[Twisted-Python] xmlrpc ExpatError

Justin Johnson justinjohnson at fastmail.fm
Wed Jun 18 10:22:44 MDT 2003


That was my problem.  Hmmm...  I don't quite understand why though. 
Would you mind explaining this further?  I didn't quite follow your
explanation.

Thanks so much.
-Justin

On Thu, 19 Jun 2003 00:15:16 +0800, "Wari Wahab" <wari at home.wari.org>
said:
> Justin Johnson wrote:
> > Hello,
> > 
> > I have an xmlrpc server using twisted.web.xmlrpc.XMLRPC.  I have been
> > able to contect to it fine using just python's xmlrpclib on the client,
> > and am now switching over to use twisted on the client as well.  I'm
> > getting a wierd error though that I'm not sure how to track down.  Below
> > is are snippets of my client code, server code, and the error I'm
> > getting.
> 
> I've got this problem a while ago as well.. It costs me a few days of 
> headaches, and no one here seems to be able to answer the question, 
> until I did some probing myself.
> 
> > [client]
> > def connectToServer(server):
> > 	s = Proxy('http://%s:%s' % (server, config.portNumber))
> > 	return s
> 
> Your fix:
> s = Proxy('http://%s:%s/' % (server, config.portNumber))
> -----------------------^
> 
> See if that solves your problem as it solves mine.
> 
> If it does, then the issue is that the request sent over to the twisted 
> server looks like:
> 
> POST  HTTP/1.0 # Note the lack of '/'
> 
> Which then gets converted nicely to:
> 
> POST  HTTP/1.0 HTTP/0.9
> 
> -- 
> Regards: Wari Wahab
> RoughingIT - http://roughingit.subtlehints.net
> PyBlosxom  - http://roughingit.subtlehints.net/pyblosxom
> 
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> 




More information about the Twisted-Python mailing list