kopia lustrzana https://github.com/micropython/micropython-lib
uaiohttpclient: Only http: protocol is supported, fail predictably for others.
rodzic
16c57c50f4
commit
2d23c7f125
|
@ -48,6 +48,8 @@ def request_raw(method, url):
|
|||
except ValueError:
|
||||
proto, dummy, host = url.split("/", 2)
|
||||
path = ""
|
||||
if proto != "http:":
|
||||
raise ValueError("Unsupported protocol: " + proto)
|
||||
reader, writer = yield from asyncio.open_connection(host, 80)
|
||||
# Use protocol 1.0, because 1.1 always allows to use chunked transfer-encoding
|
||||
# But explicitly set Connection: close, even though this should be default for 1.0,
|
||||
|
|
Ładowanie…
Reference in New Issue