Diff

plugins/mod_http_files.lua @ 7230:20246b139607

mod_http_files: Preserve a trailing / in paths (fixes #639)
author Kim Alvefur <zash@zash.se>
date Thu, 03 Mar 2016 15:31:46 +0100
parent 7229:dcc8ed11173c
child 7231:c018a44b822a
line wrap: on
line diff
--- a/plugins/mod_http_files.lua	Thu Mar 03 15:30:00 2016 +0100
+++ b/plugins/mod_http_files.lua	Thu Mar 03 15:31:46 2016 +0100
@@ -75,6 +75,9 @@
 			out[c] = component;
 		end
 	end
+	if path:sub(-1,-1) == "/" then
+		out[c+1] = "";
+	end
 	return "/"..table.concat(out, "/");
 end