aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-11-09 23:15:37 +0100
committerKim Alvefur <zash@zash.se>2018-11-09 23:15:37 +0100
commitd547a7d15cab7ede8821221b2b09edc293b40cde (patch)
treedd5729ed6e497941df021ad7d9f2f66af1e80ea8 /net
parentef25fe98b2c605335e9f31e363eb49a832ca9f48 (diff)
parent4dcb48996d0d6a3db3755d800fd0ec2b5b2d833a (diff)
downloadprosody-d547a7d15cab7ede8821221b2b09edc293b40cde.tar.gz
prosody-d547a7d15cab7ede8821221b2b09edc293b40cde.zip
Merge 0.11->trunk
Diffstat (limited to 'net')
-rw-r--r--net/http.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/http.lua b/net/http.lua
index b401b040..fe5250ac 100644
--- a/net/http.lua
+++ b/net/http.lua
@@ -24,7 +24,6 @@ local tonumber, tostring, traceback =
tonumber, tostring, debug.traceback;
local xpcall = require "util.xpcall".xpcall;
local error = error
-local setmetatable = setmetatable;
local log = require "util.logger".init("http");
@@ -273,7 +272,12 @@ local function new(options)
options = options;
request = request;
new = options and function (new_options)
- return new(setmetatable(new_options, { __index = options }));
+ local final_options = {};
+ for k, v in pairs(options) do final_options[k] = v; end
+ if new_options then
+ for k, v in pairs(new_options) do final_options[k] = v; end
+ end
+ return new(final_options);
end or new;
events = events.new();
};