Newbie trying to use HTTPS, pls help

sydneyguru davidjtaylor at optushome.com.au
Fri Mar 26 00:45:05 EST 2004


Hi,
I think the sockets module has not been compiled for ssl. That's my guess at
why this won't work...
Can anyone suggest a better way..

set up params & headers
...
>>> conn = httplib.HTTPSConnection("betting.sports555.com") // imaginary url
>>> conn.request("POST", "/cgi-bin/login", params, headers)
Traceback (most recent call last):
  File "<pyshell#28>", line 1, in ?
    conn.request("POST", "/cgi-bin/login", params, headers)
  File "D:\Python22\lib\httplib.py", line 701, in request
    self._send_request(method, url, body, headers)
  File "D:\Python22\lib\httplib.py", line 723, in _send_request
    self.endheaders()
  File "D:\Python22\lib\httplib.py", line 695, in endheaders
    self._send_output()
  File "D:\Python22\lib\httplib.py", line 581, in _send_output
    self.send(msg)
  File "D:\Python22\lib\httplib.py", line 548, in send
    self.connect()
  File "D:\Python22\lib\httplib.py", line 945, in connect
    ssl = socket.ssl(realsock, self.key_file, self.cert_file)
AttributeError: 'module' object has no attribute 'ssl'
>>>

cheers,

sydneyguru






More information about the Python-list mailing list