Changeset

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
parents 7229:dcc8ed11173c
children 7231:c018a44b822a 7328:de76ded98b84
files plugins/mod_http_files.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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