From: Ben Darnell Date: Sun, 15 May 2011 03:21:05 +0000 (-0700) Subject: Tolerate servers that don't include reason text in the status line. X-Git-Tag: v2.0.0~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f5f51b51d8edbe991c33de0c141d92b2d94f58c;p=thirdparty%2Ftornado.git Tolerate servers that don't include reason text in the status line. --- diff --git a/tornado/simple_httpclient.py b/tornado/simple_httpclient.py index 2efe7e445..19645e324 100644 --- a/tornado/simple_httpclient.py +++ b/tornado/simple_httpclient.py @@ -254,7 +254,7 @@ class _HTTPConnection(object): def _on_headers(self, data): data = data.decode("latin1") first_line, _, header_data = data.partition("\r\n") - match = re.match("HTTP/1.[01] ([0-9]+) .*", first_line) + match = re.match("HTTP/1.[01] ([0-9]+)", first_line) assert match self.code = int(match.group(1)) self.headers = HTTPHeaders.parse(header_data)