From 2f5f51b51d8edbe991c33de0c141d92b2d94f58c Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sat, 14 May 2011 20:21:05 -0700 Subject: [PATCH] Tolerate servers that don't include reason text in the status line. --- tornado/simple_httpclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.47.3