Mercurial > prosody-hg
comparison plugins/mod_http.lua @ 8970:75c3b1bd9d7b
mod_http: Rename loop variable to avoid name clash [luacheck]
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 06 Jul 2018 00:13:45 +0200 |
| parents | 48d0b908f8b6 |
| children | e59207c909c0 |
comparison
equal
deleted
inserted
replaced
| 8969:48d0b908f8b6 | 8970:75c3b1bd9d7b |
|---|---|
| 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 -- luacheck: ignore 213/interface | 70 for interface, ports in pairs(http_services) do -- luacheck: ignore 213/interface |
| 71 for port, services in pairs(ports) do -- luacheck: ignore 512 | 71 for port, service 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 service[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 "/").. |
| 77 (get_base_path(module, app_name, default_path or "/"..app_name):sub(2)); | 77 (get_base_path(module, app_name, default_path or "/"..app_name):sub(2)); |
| 78 } | 78 } |
