net.http.server: The correct Connection header value to look for is Keep-Alive, not keep-alive.
authorWaqas Hussain <waqas20@gmail.com>
Wed, 17 Apr 2013 15:28:20 -0400
changeset 5487 03ddf2375d48
parent 5486 bcf27dbef6c6
child 5488 0880a079d830
net.http.server: The correct Connection header value to look for is Keep-Alive, not keep-alive.
net/http/server.lua
--- a/net/http/server.lua	Tue Apr 16 18:18:22 2013 -0400
+++ b/net/http/server.lua	Wed Apr 17 15:28:20 2013 -0400
@@ -159,7 +159,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;