Skip to content

Commit f29477f

Browse files
committed
uaiohttpclient: Support HTTP reply lines without textual description.
E.g. "HTTP/1.1 500". RFC7230 seems to formally require at least a space after the numeric code, but it was reported that some software sends lines like above nonetheless. Ref: micropython#247
1 parent 23ac9e5 commit f29477f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

uaiohttpclient/uaiohttpclient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def request(method, url):
6767
reader = yield from request_raw(method, url)
6868
headers = []
6969
sline = yield from reader.readline()
70-
protover, status, msg = sline.split(None, 2)
71-
status = int(status)
70+
sline = sline.split(None, 2)
71+
status = int(sline[1])
7272
chunked = False
7373
while True:
7474
line = yield from reader.readline()

0 commit comments

Comments
 (0)