From 6cfd7640847bcb76f0bc85ded7cd9b57cdbdde9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=2E=20K=C3=A4rkk=C3=A4inen?= Date: Sun, 15 Dec 2019 14:05:48 +0200 Subject: [PATCH] Workaround MyPy issue. --- sanic/headers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sanic/headers.py b/sanic/headers.py index b6a2418e..6bfccddd 100644 --- a/sanic/headers.py +++ b/sanic/headers.py @@ -190,12 +190,12 @@ def format_http1_response( - If `body` is included, content-length must be specified in headers. """ - headers = format_http1(headers) + headerbytes = format_http1(headers) 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" % ( status, STATUS_CODES.get(status, b"UNKNOWN"), - headers, + headerbytes, body, )