Skip to content

Commit 633f030

Browse files
committed
urllib.urequest: Add server_hostname param to ussl.wrap_socket() call.
1 parent 98502a2 commit 633f030

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

urllib.urequest/urllib/urequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def urlopen(url, data=None, method="GET"):
2525
s = usocket.socket()
2626
s.connect(addr)
2727
if proto == "https:":
28-
s = ussl.wrap_socket(s)
28+
s = ussl.wrap_socket(s, server_hostname=host)
2929

3030
s.write(method)
3131
s.write(b" /")

0 commit comments

Comments
 (0)