aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-03-03 15:31:46 +0100
committerKim Alvefur <zash@zash.se>2016-03-03 15:31:46 +0100
commitd5eb6240a71463bca1b15ea1b24d600a73c86560 (patch)
tree68439943f8a3ed1ddaf012795fa69e56b965fb8c /plugins
parent2f1867aeb26582383f2494bb0ad8fffdd4310f84 (diff)
downloadprosody-d5eb6240a71463bca1b15ea1b24d600a73c86560.tar.gz
prosody-d5eb6240a71463bca1b15ea1b24d600a73c86560.zip
mod_http_files: Preserve a trailing / in paths (fixes #639)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_files.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_http_files.lua b/plugins/mod_http_files.lua
index fc39628c..53b6469b 100644
--- a/plugins/mod_http_files.lua
+++ b/plugins/mod_http_files.lua
@@ -75,6 +75,9 @@ function sanitize_path(path)
out[c] = component;
end
end
+ if path:sub(-1,-1) == "/" then
+ out[c+1] = "";
+ end
return "/"..table.concat(out, "/");
end