diff options
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 2688359..2b32a1b 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -613,7 +613,10 @@ class HTTPSConnection(HTTPConnection): 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) + realsock = sock + if hasattr(sock, "_sock"): + realsock = sock._sock + ssl = socket.ssl(realsock, self.key_file, self.cert_file) self.sock = FakeSocket(sock, ssl) |