Update(boards): micropython板卡执行 build:prod
This commit is contained in:
@@ -43,7 +43,7 @@ def request(method, url, data=None, json=None, headers={}, stream=None, parse_he
|
||||
if proto == "http:":
|
||||
port = 80
|
||||
elif proto == "https:":
|
||||
import ussl
|
||||
import ssl
|
||||
port = 443
|
||||
else:
|
||||
raise ValueError("Unsupported protocol: " + proto)
|
||||
@@ -63,7 +63,7 @@ def request(method, url, data=None, json=None, headers={}, stream=None, parse_he
|
||||
try:
|
||||
s.connect(ai[-1])
|
||||
if proto == "https:":
|
||||
s = ussl.wrap_socket(s, server_hostname=host)
|
||||
s = ssl.wrap_socket(s, server_hostname=host)
|
||||
s.write(b"%s /%s HTTP/1.0\r\n" % (method, path))
|
||||
if not "Host" in headers:
|
||||
s.write(b"Host: %s\r\n" % host)
|
||||
|
||||
Reference in New Issue
Block a user