aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-04-03 13:53:21 +0100
committerMatthew Wild <mwild1@gmail.com>2013-04-03 13:53:21 +0100
commita5ccb8a860924f48570242e468267885137e3e9a (patch)
treebf22e9f39d9ccaa98ba9f214cfa01d7c3408d46a /net
parent1ea4d9ab7bde60b904192718247d49aa1337a18e (diff)
parent1728207c6bb7f3955535ba4a2c1c6fde8e624ed8 (diff)
downloadprosody-a5ccb8a860924f48570242e468267885137e3e9a.tar.gz
prosody-a5ccb8a860924f48570242e468267885137e3e9a.zip
Merge 0.9->trunk
Diffstat (limited to 'net')
-rw-r--r--net/http/server.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/http/server.lua b/net/http/server.lua
index 87d82418..20c2da3e 100644
--- a/net/http/server.lua
+++ b/net/http/server.lua
@@ -219,7 +219,13 @@ function handle_request(conn, request, finish_cb)
body = result;
elseif result_type == "table" then
for k, v in pairs(result) do
- response[k] = v;
+ if k ~= "headers" then
+ response[k] = v;
+ else
+ for header_name, header_value in pairs(v) do
+ response.headers[header_name] = header_value;
+ end
+ end
end
end
response:send(body);