Comparison

plugins/mod_http.lua @ 8969:48d0b908f8b6

mod_http: Silecence harmless warnings
author Kim Alvefur <zash@zash.se>
date Fri, 06 Jul 2018 00:12:38 +0200
parent 8596:71da54c7f797
child 8970:75c3b1bd9d7b
comparison
equal deleted inserted replaced
8968:27c6fff84c8f 8969:48d0b908f8b6
65 if external_url.scheme and external_url.port == nil then 65 if external_url.scheme and external_url.port == nil then
66 external_url.port = ports_by_scheme[external_url.scheme]; 66 external_url.port = ports_by_scheme[external_url.scheme];
67 end 67 end
68 local services = portmanager.get_active_services(); 68 local services = portmanager.get_active_services();
69 local http_services = services:get("https") or services:get("http") or {}; 69 local http_services = services:get("https") or services:get("http") or {};
70 for interface, ports in pairs(http_services) do 70 for interface, ports in pairs(http_services) do -- luacheck: ignore 213/interface
71 for port, services in pairs(ports) do 71 for port, services in pairs(ports) do -- luacheck: ignore 512
72 local url = { 72 local url = {
73 scheme = (external_url.scheme or services[1].service.name); 73 scheme = (external_url.scheme or services[1].service.name);
74 host = (external_url.host or module:get_option_string("http_host", module.host)); 74 host = (external_url.host or module:get_option_string("http_host", module.host));
75 port = tonumber(external_url.port) or port or 80; 75 port = tonumber(external_url.port) or port or 80;
76 path = normalize_path(external_url.path or "/").. 76 path = normalize_path(external_url.path or "/")..