--- libs/lucid-http/luasrc/lucid/http/server.lua.orig	2016-02-20 08:43:54.476971044 -0500
+++ libs/lucid-http/luasrc/lucid/http/server.lua	2016-02-20 08:45:34.520744877 -0500
@@ -341,18 +341,17 @@
 end
 
 local hdr2env = {
-	["Content-Length"] = "CONTENT_LENGTH",
-	["Content-Type"] = "CONTENT_TYPE",
-	["Content-type"] = "CONTENT_TYPE",
-	["Accept"] = "HTTP_ACCEPT",
-	["Accept-Charset"] = "HTTP_ACCEPT_CHARSET",
-	["Accept-Encoding"] = "HTTP_ACCEPT_ENCODING",
-	["Accept-Language"] = "HTTP_ACCEPT_LANGUAGE",
-	["Connection"] = "HTTP_CONNECTION",
-	["Cookie"] = "HTTP_COOKIE",
-	["Host"] = "HTTP_HOST",
-	["Referer"] = "HTTP_REFERER",
-	["User-Agent"] = "HTTP_USER_AGENT"
+	["content-length"] = "CONTENT_LENGTH",
+	["content-type"] = "CONTENT_TYPE",
+	["accept"] = "HTTP_ACCEPT",
+	["accept-charset"] = "HTTP_ACCEPT_CHARSET",
+	["accept-encoding"] = "HTTP_ACCEPT_ENCODING",
+	["accept-language"] = "HTTP_ACCEPT_LANGUAGE",
+	["connection"] = "HTTP_CONNECTION",
+	["cookie"] = "HTTP_COOKIE",
+	["host"] = "HTTP_HOST",
+	["referer"] = "HTTP_REFERER",
+	["user-agent"] = "HTTP_USER_AGENT"
 }
 
 --- Parse the request headers and prepare the environment.
@@ -386,7 +385,7 @@
 			key, val = line:match("^([%w-]+)%s?:%s?(.*)")
 			if key then
 				req.headers[key] = val
-				envkey = hdr2env[key]
+				envkey = hdr2env[key:lower()]
 				if envkey then
 					env[envkey] = val
 				end

Use case insensitive compare for adding HTTP headers into the environment
[wrt] Use case insensitive compare for adding HTTP headers into the environment
