M2Crypto.httpslib.HTTPSConnection only works once?

Heikki Toivonen <[email protected]>
Newsgroups gmane.comp.python.cryptography
Message-ID <[email protected]>
I am experiencing some problems with M2Crypto.httpslib.HTTPSConnection.
I can open a connection to an SSL server, and do one request, but after
that the requests always fail with:

File "httplib.py", line 860, in getresponse
     method=self._method)
M2Crypto.SSL.SSLError: bad write retry

Has anyone else seen this?

The code is part of Chandler, and the file of interest is
http://lxr.osafoundation.org/source/chandler/parcels/osaf/framework/sharing/WebDAV.py

My test app does this:

from osaf.framework.sharing.WebDAV import Client
from M2Crypto.SSL import Context

class A:
     username = '' # Fill these in (can be anonymous in some cases)
     password = ''

class U:
     # Note, you can get a free WebDAV account from Sharemation
     host = 'www.sharemation.com'
     port = 443

acct = A()
url = U()
d=Client(url.host, url.port, acct.username, acct.password,
          ctx=Context(), useSSL=True)

if 1:
     r= d.getacl('/heikki2/hello.txt')
     print r.read()

     # Works so far, but raises exception when I try:
     r= d.getacl('/heikki2/hello.txt')

     r.close()


--
   Heikki Toivonen
signature.asc (application/pgp-signature, 249 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFB+rHMb8x8KoP+JuwRAqVjAJ9ZSZG4UHQcJkSdTlRAxknzKKzusgCgkKeO
rk1PcUa7+9F7y8QgWUXc7tM=
=qhJ5
-----END PGP SIGNATURE-----
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.