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: https://github.com/micropython/micropython-lib/issues/247
pull/236/merge
Paul Sokolovsky 2018-01-14 11:50:32 +02:00
rodzic 23ac9e5821
commit f29477fea5
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -67,8 +67,8 @@ def request(method, url):
reader = yield from request_raw(method, url)
headers = []
sline = yield from reader.readline()
protover, status, msg = sline.split(None, 2)
status = int(status)
sline = sline.split(None, 2)
status = int(sline[1])
chunked = False
while True:
line = yield from reader.readline()