[PYTHON-CRYPTO] httpslib.HTTPSConnection problem.

Terry Kerr terry at BIZARSOFTWARE.COM.AU
Thu Jul 15 10:41:25 CEST 2004


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,
h.request('POST', path, params, headers)
resp = h.getresponse()
f = resp.fp
resp = resp.read()

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:

<BODY TEXT="000000">
<H1>Error 500</H1>HTTP Web Server: Invalid POST Request Exception</BODY>

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?


More information about the python-crypto mailing list