[Twisted-Python] https xmlrpc through proxy
Grant Kelly
gkwrcc at dri.edu
Thu Oct 20 16:33:07 MDT 2005
Hello,
I just signed up for this list because I am having no success connecting
to an https xmlrpc server through a proxy/firewall. The proxy can do
both http and https for the web just fine. I have also been able to
connect to an xmlrpc server with just http through the proxy. I am
using the ProxiedXMLRPC class from this page:
http://twistedmatrix.com/pipermail/twisted-python/2004-December/009258.html
The author notes it isn't tested with https.
In order to connect to the xmlrpc server, a certificate and key need to
be specified. I don't know where to specify these files.
I don't even know if this is technically possible. I am hoping that it is.
Any suggestions will be appreciated.
Grant
PS: I'm going to include the python traceback in case it provides any
more information:
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/twisted/python/log.py",
line 41, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File
"/usr/local/lib/python2.4/site-packages/twisted/python/context.py", line
52, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File
"/usr/local/lib/python2.4/site-packages/twisted/python/context.py", line
31, in callWithContext
return func(*args,**kw)
File
"/usr/local/lib/python2.4/site-packages/twisted/internet/selectreactor.py",
line 139, in _doReadOrWrite
why = getattr(selectable, method)()
--- <exception caught here> ---
File "/usr/local/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 111, in doRead
return Connection.doRead(self)
File "/usr/local/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 343, in doRead
data = self.socket.recv(self.bufferSize)
OpenSSL.SSL.Error: [('SSL routines', 'SSL3_READ_BYTES', 'ssl handshake
failure')]
Traceback (most recent call last):
File "testproxy.py", line 54, in ?
reactor.run()
File
"/usr/local/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 199, in run
self.mainLoop()
File
"/usr/local/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 210, in mainLoop
self.doIteration(t)
File
"/usr/local/lib/python2.4/site-packages/twisted/internet/selectreactor.py",
line 133, in doSelect
_logrun(selectable, _drdw, selectable, method, dict)
--- <exception caught here> ---
File "/usr/local/lib/python2.4/site-packages/twisted/python/log.py",
line 56, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/local/lib/python2.4/site-packages/twisted/python/log.py",
line 41, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File
"/usr/local/lib/python2.4/site-packages/twisted/python/context.py", line
52, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File
"/usr/local/lib/python2.4/site-packages/twisted/python/context.py", line
31, in callWithContext
return func(*args,**kw)
File
"/usr/local/lib/python2.4/site-packages/twisted/internet/selectreactor.py",
line 149, in _doReadOrWrite
self._disconnectSelectable(selectable, why, method=="doRead")
File
"/usr/local/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 234, in _disconnectSelectable
selectable.connectionLost(f)
File "/usr/local/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 556, in connectionLost
Connection.connectionLost(self, reason)
File "/usr/local/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 402, in connectionLost
protocol.connectionLost(reason)
File "/usr/local/lib/python2.4/site-packages/twisted/web/http.py",
line 351, in connectionLost
self.handleResponseEnd()
File "/usr/local/lib/python2.4/site-packages/twisted/web/http.py",
line 357, in handleResponseEnd
self.handleResponse(b)
File "/usr/local/lib/python2.4/site-packages/twisted/web/xmlrpc.py",
line 259, in handleResponse
self.factory.parseResponse(contents)
File "/usr/local/lib/python2.4/site-packages/twisted/web/xmlrpc.py",
line 284, in parseResponse
response = xmlrpclib.loads(contents)
File "/usr/local/lib/python2.4/xmlrpclib.py", line 1080, in loads
p.close()
File "/usr/local/lib/python2.4/xmlrpclib.py", line 530, in close
self._parser.Parse("", 1) # end of data
xml.parsers.expat.ExpatError: no element found: line 1, column 0
More information about the Twisted-Python
mailing list