From 404ec8bd038808f9b4da64d71eb16242aa701563 Mon Sep 17 00:00:00 2001 From: Tom Arnfeld Date: Wed, 23 Jul 2014 18:27:03 +0100 Subject: [PATCH] Fixed a bug with keep-alive chunked requests If you make a POST request with 'Connection: Keep-Alive' and use chunked body encoding, tornado will not interpret that as a connection that can be kept alive, and will close the connection. --- tornado/http1connection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tornado/http1connection.py b/tornado/http1connection.py index 72f729d78..85efe68ec 100644 --- a/tornado/http1connection.py +++ b/tornado/http1connection.py @@ -455,6 +455,7 @@ class HTTP1Connection(httputil.HTTPConnection): if start_line.version == "HTTP/1.1": return connection_header != "close" elif ("Content-Length" in headers + or headers.get("Transfer-Encoding", "").lower() == "chunked" or start_line.method in ("HEAD", "GET")): return connection_header == "keep-alive" return False -- 2.47.2