Skip to content

Commit 78ce2a8

Browse files
committed
urequests: Add server_hostname param to ussl.wrap_socket() call.
1 parent efd7cd5 commit 78ce2a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

urequests/urequests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def request(method, url, data=None, json=None, headers={}, stream=None):
5353
s = usocket.socket()
5454
s.connect(addr)
5555
if proto == "https:":
56-
s = ussl.wrap_socket(s)
56+
s = ussl.wrap_socket(s, server_hostname=host)
5757
s.write(b"%s /%s HTTP/1.0\r\n" % (method, path))
5858
if not "Host" in headers:
5959
s.write(b"Host: %s\r\n" % host)

0 commit comments

Comments
 (0)