From b507c9ac5ec1a3b843c9edddbcca88af47a6f3ae Mon Sep 17 00:00:00 2001 From: Chris Seto Date: Mon, 26 Oct 2015 01:23:50 -0400 Subject: [PATCH] Cast start_line.code to an integer Allows use of http.client.HTTPStatus in self.write_status '%s' % http.client.OK == 'HTTPStatus.OK' '%d' % http.client.OK == '200' --- tornado/http1connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tornado/http1connection.py b/tornado/http1connection.py index 1c577063b..71f0790d4 100644 --- a/tornado/http1connection.py +++ b/tornado/http1connection.py @@ -342,7 +342,7 @@ class HTTP1Connection(httputil.HTTPConnection): 'Transfer-Encoding' not in headers) else: self._response_start_line = start_line - lines.append(utf8('HTTP/1.1 %s %s' % (start_line[1], start_line[2]))) + lines.append(utf8('HTTP/1.1 %d %s' % (start_line[1], start_line[2]))) self._chunking_output = ( # TODO: should this use # self._request_start_line.version or -- 2.47.2