Diff

net/http/server.lua @ 5754:dee0f05ccf70

net.http.server: Fix Keep-Alive requests with HTTP 1.0
author Kim Alvefur <zash@zash.se>
date Mon, 22 Jul 2013 17:28:37 +0200
parent 5505:0b6a99e6c1b1
child 5776:bd0ff8ae98a8
child 6360:ffcd3992a40c
line wrap: on
line diff
--- a/net/http/server.lua	Mon Jul 15 23:43:20 2013 +0100
+++ b/net/http/server.lua	Mon Jul 22 17:28:37 2013 +0200
@@ -168,7 +168,7 @@
 	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;