Comparison

mod_http_upload/mod_http_upload.lua @ 4076:f1f796e551f1

mod_http_upload: Log warning when loaded on user host
author Matthew Wild <mwild1@gmail.com>
date Tue, 25 Aug 2020 13:13:56 +0100
parent 3962:190e74e097ee
child 4443:0a56dc6c61af
comparison
equal deleted inserted replaced
4075:4841cf3fded5 4076:f1f796e551f1
37 local parser_body_limit = module:context("*"):get_option_number("http_max_content_size", 10*1024*1024); 37 local parser_body_limit = module:context("*"):get_option_number("http_max_content_size", 10*1024*1024);
38 if file_size_limit > parser_body_limit then 38 if file_size_limit > parser_body_limit then
39 module:log("warn", "%s_file_size_limit exceeds HTTP parser limit on body size, capping file size to %d B", 39 module:log("warn", "%s_file_size_limit exceeds HTTP parser limit on body size, capping file size to %d B",
40 module.name, parser_body_limit); 40 module.name, parser_body_limit);
41 file_size_limit = parser_body_limit; 41 file_size_limit = parser_body_limit;
42 end
43
44 if prosody.hosts[module.host].type == "local" then
45 module:log("warn", "mod_%s loaded on a user host, this may be incompatible with some client software, see docs for correct usage", module.name);
42 end 46 end
43 47
44 -- depends 48 -- depends
45 module:depends("http"); 49 module:depends("http");
46 module:depends("disco"); 50 module:depends("disco");