From 76d4f07d2bca5b413c526fcec569abf16f5cd2f5 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 17 Apr 2013 15:28:20 -0400 Subject: net.http.server: The correct Connection header value to look for is Keep-Alive, not keep-alive. --- net/http/server.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/http/server.lua b/net/http/server.lua index 830579c9..a983b8d5 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -159,7 +159,7 @@ function handle_request(conn, request, finish_cb) local conn_header = request.headers.connection; conn_header = conn_header and ","..conn_header:gsub("[ \t]", ""):lower().."," or "" local httpversion = request.httpversion - local persistent = conn_header:find(",keep-alive,", 1, true) + local persistent = conn_header:find(",Keep-Alive,", 1, true) or (httpversion == "1.1" and not conn_header:find(",close,", 1, true)); local response_conn_header; -- cgit v1.2.3