kopia lustrzana https://github.com/micropython/micropython-lib
http.client: Add pristine from CPython 3.3.3.
rodzic
cf4c27a885
commit
5fb6c52c1f
|
@ -273,8 +273,7 @@ def parse_headers(fp, _class=HTTPMessage):
|
|||
|
||||
_strict_sentinel = object()
|
||||
|
||||
class HTTPResponse:
|
||||
#class HTTPResponse(io.RawIOBase):
|
||||
class HTTPResponse(io.RawIOBase):
|
||||
|
||||
# See RFC 2616 sec 19.6 and RFC 1945 sec 6 for details.
|
||||
|
||||
|
@ -1038,7 +1037,7 @@ class HTTPConnection:
|
|||
header = header.encode('ascii')
|
||||
values = list(values)
|
||||
for i, one_value in enumerate(values):
|
||||
if isinstance(one_value, str):
|
||||
if hasattr(one_value, 'encode'):
|
||||
values[i] = one_value.encode('latin-1')
|
||||
elif isinstance(one_value, int):
|
||||
values[i] = str(one_value).encode('ascii')
|
||||
|
|
Ładowanie…
Reference in New Issue