[PYTHON-CRYPTO] httpslib.HTTPSConnection problem.
Terry Kerr
terry at BIZARSOFTWARE.COM.AU
Thu Jul 15 10:41:25 CEST 2004
Hi,
I have a python app that posts info to a cc payment gateway. The code is
very simple, and works fine with with M2Crypto 0.07 and python 2.1.3.
from M2Crypto import httpslib, SSL
X-Mozilla-Status: 8000
X-Mozilla-Status2: 00000000
ctx = SSL.Context('sslv3')
h = httpslib.HTTPSConnection("merchant.ematters.com.au", 443,
ssl_context=ctx)
h.request('POST', path, params, headers)
resp = h.getresponse()
f = resp.fp
resp = resp.read()
f.close()
h.close()
Now I have upgraded to M2Crypto 0.13 and python 2.3.3 and the code no longer
works. I am running with exactly the same path, params and headers, but the
response I get now is:
<HTML>
<HEAD>
<TITLE>Error</TITLE></HEAD>
<BODY TEXT="000000">
<H1>Error 500</H1>HTTP Web Server: Invalid POST Request Exception</BODY>
</HTML>
I placed a debug print in SSL/Connection.py::Connection._write_bio() and
verified that the data being send is the same for both python/M2Crypto
versions, so I am not sure what else could be incorrect.
Does anyone have an suggestions?
terry
More information about the python-crypto
mailing list