# HG changeset patch # User Kim Alvefur # Date 1471524671 -7200 # Node ID 588ed6451984276c4d03435a6af278bf910b1fd8 # Parent d430573fe9f87ceca5ac00943f08c873c042548d mod_http: Allow configuring http parser size limits diff -r d430573fe9f8 -r 588ed6451984 plugins/mod_http.lua --- a/plugins/mod_http.lua Thu Aug 18 14:50:39 2016 +0200 +++ b/plugins/mod_http.lua Thu Aug 18 14:51:11 2016 +0200 @@ -18,6 +18,9 @@ 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