Workaround MyPy issue.
This commit is contained in:
parent
347fd96e72
commit
6cfd764084
|
@ -190,12 +190,12 @@ def format_http1_response(
|
||||||
|
|
||||||
- If `body` is included, content-length must be specified in headers.
|
- If `body` is included, content-length must be specified in headers.
|
||||||
"""
|
"""
|
||||||
headers = format_http1(headers)
|
headerbytes = format_http1(headers)
|
||||||
if status == 200:
|
if status == 200:
|
||||||
return b"HTTP/1.1 200 OK\r\n%b\r\n%b" % (headers, body)
|
return b"HTTP/1.1 200 OK\r\n%b\r\n%b" % (headerbytes, body)
|
||||||
return b"HTTP/1.1 %d %b\r\n%b\r\n%b" % (
|
return b"HTTP/1.1 %d %b\r\n%b\r\n%b" % (
|
||||||
status,
|
status,
|
||||||
STATUS_CODES.get(status, b"UNKNOWN"),
|
STATUS_CODES.get(status, b"UNKNOWN"),
|
||||||
headers,
|
headerbytes,
|
||||||
body,
|
body,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user