mod_http: Don't produce paths with double / if a module is set to serve /
authorKim Alvefur <zash@zash.se>
Tue, 21 Aug 2012 21:03:20 +0200
changeset 5092 a89f8f2f2943
parent 5091 dbc483d06a07
child 5093 1ce9e8068dda
mod_http: Don't produce paths with double / if a module is set to serve /
plugins/mod_http.lua
--- a/plugins/mod_http.lua	Tue Aug 21 18:03:40 2012 +0200
+++ b/plugins/mod_http.lua	Tue Aug 21 21:03:20 2012 +0200
@@ -30,6 +30,9 @@
 	if method:sub(1,1) == "/" then
 		return nil;
 	end
+	if app_path == "/" and path:sub(1,1) == "/" then
+		app_path = "";
+	end
 	return method:upper().." "..host..app_path..path;
 end