Diff

plugins/mod_http.lua @ 5092:a89f8f2f2943

mod_http: Don't produce paths with double / if a module is set to serve /
author Kim Alvefur <zash@zash.se>
date Tue, 21 Aug 2012 21:03:20 +0200
parent 4915:3fbc01d1fc5a
child 5093:1ce9e8068dda
line wrap: on
line diff
--- 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