From: Chris Seto Date: Mon, 26 Oct 2015 05:23:50 +0000 (-0400) Subject: Cast start_line.code to an integer X-Git-Tag: v4.4.0b1~72^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b507c9ac5ec1a3b843c9edddbcca88af47a6f3ae;p=thirdparty%2Ftornado.git 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' --- 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