httpslib.HTTPSConnection problem.

Terry Kerr <[email protected]>
Newsgroups gmane.comp.python.cryptography
Message-ID <LISTSERV%[email protected]>
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
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.