Update(boards): micropython板卡执行 build:prod

This commit is contained in:
王立帮
2024-09-29 23:09:36 +08:00
parent 01696b9ceb
commit b15e67a168
26 changed files with 349 additions and 18 deletions

View File

@@ -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)