From 9a9d82e049977c6faed39b711ee73a4b22e7f1da Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 26 May 2012 19:49:43 +0100 Subject: mod_http: Fix traceback when no HTTP services succeed in binding --- plugins/mod_http.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_http.lua') 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); -- cgit v1.2.3