Diff

plugins/mod_http.lua @ 6598:4b4852c4f96a

mod_http: Return a static string from module:http_url() when no ports are enabled and log a warning
author Kim Alvefur <zash@zash.se>
date Mon, 23 Mar 2015 18:45:02 +0100
parent 6597:321321f566fb
child 6602:61b6a4fc65f1
child 7580:588ed6451984
line wrap: on
line diff
--- 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)