From be05320ee781a83815f3a98916d6bbc1520433af Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 22 Jul 2013 17:28:37 +0200 Subject: net.http.server: Fix Keep-Alive requests with HTTP 1.0 --- net/http/server.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/http/server.lua b/net/http/server.lua index dec7da19..0f379e96 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -168,7 +168,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