Comparison

plugins/mod_http.lua @ 12977:74b9e05af71e

plugins: Prefix module imports with prosody namespace
author Kim Alvefur <zash@zash.se>
date Fri, 24 Mar 2023 13:15:28 +0100
parent 12923:419e55abd285
child 13069:45caa4e43775
comparison
equal deleted inserted replaced
12976:a187600ec7d6 12977:74b9e05af71e
9 module:set_global(); 9 module:set_global();
10 pcall(function () 10 pcall(function ()
11 module:depends("http_errors"); 11 module:depends("http_errors");
12 end); 12 end);
13 13
14 local portmanager = require "core.portmanager"; 14 local portmanager = require "prosody.core.portmanager";
15 local moduleapi = require "core.moduleapi"; 15 local moduleapi = require "prosody.core.moduleapi";
16 local url_parse = require "socket.url".parse; 16 local url_parse = require "socket.url".parse;
17 local url_build = require "socket.url".build; 17 local url_build = require "socket.url".build;
18 local normalize_path = require "util.http".normalize_path; 18 local normalize_path = require "prosody.util.http".normalize_path;
19 local set = require "util.set"; 19 local set = require "prosody.util.set";
20 20
21 local ip_util = require "util.ip"; 21 local ip_util = require "prosody.util.ip";
22 local new_ip = ip_util.new_ip; 22 local new_ip = ip_util.new_ip;
23 local match_ip = ip_util.match; 23 local match_ip = ip_util.match;
24 local parse_cidr = ip_util.parse_cidr; 24 local parse_cidr = ip_util.parse_cidr;
25 25
26 local server = require "net.http.server"; 26 local server = require "prosody.net.http.server";
27 27
28 server.set_default_host(module:get_option_string("http_default_host")); 28 server.set_default_host(module:get_option_string("http_default_host"));
29 29
30 server.set_option("body_size_limit", module:get_option_number("http_max_content_size")); 30 server.set_option("body_size_limit", module:get_option_number("http_max_content_size"));
31 server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size")); 31 server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size"));