aboutsummaryrefslogtreecommitdiffstats
path: root/net/httpserver.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/httpserver.lua')
-rw-r--r--net/httpserver.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/httpserver.lua b/net/httpserver.lua
index 59ddbb12..55758147 100644
--- a/net/httpserver.lua
+++ b/net/httpserver.lua
@@ -152,7 +152,12 @@ local function request_reader(request, data, startpos)
startpos = (startpos or 1) + #line + 2;
local k, v = line:match("(%S+): (.+)");
if k and v then
- headers[k:lower()] = v;
+ k = k:lower();
+ if headers[k] then
+ headers[k] = headers[k]..", "..v;
+ else
+ headers[k] = v;
+ end
--log("debug", "Header: '"..k:lower().."' = '"..v.."'");
elseif #line == 0 then
headers_complete = true;