aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-18 14:51:11 +0200
committerKim Alvefur <zash@zash.se>2016-08-18 14:51:11 +0200
commit85b4b476b6e58664681f1dcd7a06f50a2eca92cc (patch)
treed3c11d6a4f0bd1b1bf110a598d9338c67d24cc92 /plugins
parentc7c1e0eca23d2a65dab01513b74b39754a8cd0c9 (diff)
downloadprosody-85b4b476b6e58664681f1dcd7a06f50a2eca92cc.tar.gz
prosody-85b4b476b6e58664681f1dcd7a06f50a2eca92cc.zip
mod_http: Allow configuring http parser size limits
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 9b574bc8..03b23480 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -18,6 +18,9 @@ local server = require "net.http.server";
server.set_default_host(module:get_option_string("http_default_host"));
+server.set_option("body_size_limit", module:get_option_number("http_max_content_size"));
+server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size"));
+
local function normalize_path(path)
if path:sub(-1,-1) == "/" then path = path:sub(1, -2); end
if path:sub(1,1) ~= "/" then path = "/"..path; end