On Sun, Apr 5, 2009 at 8:17 AM, Good Z <goodz...@yahoo.com> wrote: > Dear all, > I am using Python 2.4.3 for my project. We need to use HTTPS with > python2.4.3 unfortunately it seems httplib is not working fine for me. Below > is small code that works well with Python2.6.1 but not with Python2.4.3. > Unfortunately its not possible for me to move away from Python 2.4.3. Would > request if anyone has any idea how to make this programs work in > Python2.4.3. > > import httplib > conn1 = httplib.HTTPSConnection(WEBSITE_ADDRESS) > conn1.putrequest('GET', RELATIVE_ADDR) > conn1.putheader('Connection', 'close') > conn1.endheaders() > > r1 = conn1.getresponse() > > data1 = r1.read() > print data1 > conn1.close() > > One executing the above program, it crash while reading the response and > gives following error: > Traceback (most recent call last): > File "<pyshell#11>", line 1, in <module> > r1 = conn1.getresponse() > File "C:\Python25\lib\httplib.py", line 928, in getresponse > response.begin() > File "C:\Python25\lib\httplib.py", line 385, in begin > version, status, reason = self._read_status() > File "C:\Python25\lib\httplib.py", line 349, in _read_status > raise BadStatusLine(line) > BadStatusLine > > Any help would be appreciated. > > Best Regards, > Mike. > > > -- > http://mail.python.org/mailman/listinfo/python-list > >
You may be running into http://bugs.python.org/issue5007 - if you could post the url of the site you're trying to open, I can test to see if it works in 2.5/2.6 (It won't if you're running into that bug).
-- http://mail.python.org/mailman/listinfo/python-list