urllib.urequest: Add server_hostname param to ussl.wrap_socket() call.

pull/188/head
Paul Sokolovsky 2017-06-14 18:31:16 +03:00
rodzic 98502a223a
commit 633f030d6f
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -25,7 +25,7 @@ def urlopen(url, data=None, method="GET"):
s = usocket.socket()
s.connect(addr)
if proto == "https:":
s = ussl.wrap_socket(s)
s = ussl.wrap_socket(s, server_hostname=host)
s.write(method)
s.write(b" /")