summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/http/client.py')
-rw-r--r--Lib/http/client.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py
index 0a58fcb2108..31d066bcc64 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -1288,10 +1288,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)