# HG changeset patch # User Kim Alvefur # Date 1427132702 -3600 # Node ID 4b4852c4f96a6e48a58a5d0db9a1451bb3146280 # Parent 321321f566fb4250491a14581e6a69b31491f6a5 mod_http: Return a static string from module:http_url() when no ports are enabled and log a warning diff -r 321321f566fb -r 4b4852c4f96a plugins/mod_http.lua --- a/plugins/mod_http.lua Mon Mar 23 18:44:12 2015 +0100 +++ b/plugins/mod_http.lua Mon Mar 23 18:45:02 2015 +0100 @@ -69,6 +69,8 @@ return url_build(url); end end + module:log("warn", "No http ports enabled, can't generate an external URL"); + return "http://disabled.invalid/"; end function module.add_host(module)