mod_http: Hook the host-less event if hooked from a global module httphost
authorKim Alvefur <zash@zash.se>
Fri, 21 Sep 2018 21:19:44 +0200
changeset 9339 9e8d7d461c7d
parent 9338 2dc7490899ae
child 9340 5d6b252bc36f
mod_http: Hook the host-less event if hooked from a global module
plugins/mod_http.lua
--- a/plugins/mod_http.lua	Fri Sep 21 21:19:41 2018 +0200
+++ b/plugins/mod_http.lua	Fri Sep 21 21:19:44 2018 +0200
@@ -38,7 +38,11 @@
 	if app_path == "/" and path:sub(1,1) == "/" then
 		app_path = "";
 	end
-	return method:upper().." "..host..app_path..path;
+	if host == "*" then
+		return method:upper().." "..app_path..path;
+	else
+		return method:upper().." "..host..app_path..path;
+	end
 end
 
 local function get_base_path(host_module, app_name, default_app_path)