aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-05-26 19:49:43 +0100
committerMatthew Wild <mwild1@gmail.com>2012-05-26 19:49:43 +0100
commit21f8b04a86b021937708005c7e094acc262666eb (patch)
treeab3bff211e86e54d26836960a0118387331982ec /plugins/mod_http.lua
parent317b591ea38ebc405de682d775b958480370753f (diff)
downloadprosody-21f8b04a86b021937708005c7e094acc262666eb.tar.gz
prosody-21f8b04a86b021937708005c7e094acc262666eb.zip
mod_http: Fix traceback when no HTTP services succeed in binding
Diffstat (limited to 'plugins/mod_http.lua')
-rw-r--r--plugins/mod_http.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 634fb188..53993f29 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -44,7 +44,7 @@ function moduleapi.http_url(module, app_name, default_path)
app_name = app_name or (module.name:gsub("^http_", ""));
local ext = url_parse(module:get_option_string("http_external_url")) or {};
local services = portmanager.get_active_services();
- local http_services = services:get("https") or services:get("http");
+ local http_services = services:get("https") or services:get("http") or {};
for interface, ports in pairs(http_services) do
for port, services in pairs(ports) do
local path = get_base_path(module, app_name, default_path or "/"..app_name);