From: Steven Barth Date: Tue, 21 Oct 2008 20:25:29 +0000 (+0000) Subject: Some browsers send crippled content-type headers when it comes to XHR, catch them... X-Git-Tag: 0.9.0~1073 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0ba0030745c3c23a3343484341575e127fb483f3;p=oweals%2Fluci.git Some browsers send crippled content-type headers when it comes to XHR, catch them as well --- diff --git a/libs/http/luasrc/http/protocol.lua b/libs/http/luasrc/http/protocol.lua index b9a50effe..e0c15015b 100644 --- a/libs/http/luasrc/http/protocol.lua +++ b/libs/http/luasrc/http/protocol.lua @@ -563,7 +563,7 @@ function parse_message_header( src ) -- Populate common environment variables msg.env = { CONTENT_LENGTH = msg.headers['Content-Length']; - CONTENT_TYPE = msg.headers['Content-Type']; + CONTENT_TYPE = msg.headers['Content-Type'] or msg.headers['Content-type']; REQUEST_METHOD = msg.request_method:upper(); REQUEST_URI = msg.request_uri; SCRIPT_NAME = msg.request_uri:gsub("?.+$","");