Message3006
The httplib.HTTPSConnection class uses the
socket.ssl() function, which doesn't exist, in the
HTTPSConnection.connect() function.
def connect(self):
"Connect to a host on a given (SSL) port."
sock = socket.socket(socket.AF_INET,
socket.SOCK_STREAM)
sock.connect((self.host, self.port))
ssl = socket.ssl(sock, self.key_file,
self.cert_file)
self.sock = FakeSocket(sock, ssl)
Trying to use HTTPSConnection.request() results in an
AttributeError:
>>> h = httplib.HTTPSConnection("apply.test.jprs.jp")
>>> h.request("POST", "/transact.cgi", body=body,
headers=headers)
Traceback (innermost last):
File "<console>", line 1, in ?
File "/home/ben/jython-2.0/Lib/httplib.py", line
492, in request
File "/home/ben/jython-2.0/Lib/httplib.py", line
500, in _send_request
File "/home/ben/jython-2.0/Lib/httplib.py", line
426, in putrequest
File "/home/ben/jython-2.0/Lib/httplib.py", line
367, in send
File "/home/ben/jython-2.0/Lib/httplib.py", line
616, in connect
AttributeError: module 'socket' has no attribute 'ssl'
Ben
|
|
Date |
User |
Action |
Args |
2008-02-20 17:18:58 | admin | link | issue491477 messages |
2008-02-20 17:18:58 | admin | create | |
|