diff options
Diffstat (limited to 'Lib/http')
-rw-r--r-- | Lib/http/client.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py index b4cdec4..cb1a535 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -1224,10 +1224,9 @@ else: server_hostname = self._tunnel_host else: server_hostname = self.host - sni_hostname = server_hostname if ssl.HAS_SNI else None self.sock = self._context.wrap_socket(self.sock, - server_hostname=sni_hostname) + server_hostname=server_hostname) if not self._context.check_hostname and self._check_hostname: try: ssl.match_hostname(self.sock.getpeercert(), server_hostname) |