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
commit9a9d82e049977c6faed39b711ee73a4b22e7f1da (patch)
treeab3bff211e86e54d26836960a0118387331982ec /plugins/mod_http.lua
parentb4c7a788c2ab438aa36144d8fd7cb82e668b0060 (diff)
downloadprosody-9a9d82e049977c6faed39b711ee73a4b22e7f1da.tar.gz
prosody-9a9d82e049977c6faed39b711ee73a4b22e7f1da.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);