From a3a655928d1ea221ffc8e3e1949c2a0321b8e025 Mon Sep 17 00:00:00 2001 From: benoitc Date: Thu, 1 Mar 2012 08:18:20 +0100 Subject: [PATCH] fix keepalive response. The expected response for keeep alive connections are Connection: keep-alive not keepalive. --- gunicorn/http/wsgi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 571b13af..b775bf51 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -222,7 +222,7 @@ class Response(object): elif self.should_close(): connection = "close" else: - connection = "keepalive" + connection = "keep-alive" headers = [ "HTTP/%s.%s %s\r\n" % (self.req.version[0], @@ -240,6 +240,7 @@ class Response(object): return tosend = self.default_headers() tosend.extend(["%s: %s\r\n" % (n, v) for n, v in self.headers]) + print tosend util.write(self.sock, "%s\r\n" % "".join(tosend)) self.headers_sent = True