diff options
author | Kim Alvefur <zash@zash.se> | 2016-03-03 15:31:46 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-03-03 15:31:46 +0100 |
commit | ae72fdd667dcc0fed977c1d0f20cc052390b6f1d (patch) | |
tree | 68439943f8a3ed1ddaf012795fa69e56b965fb8c /plugins/mod_http_files.lua | |
parent | e08144940d172498352d9966016bb2c6f0f04913 (diff) | |
download | prosody-ae72fdd667dcc0fed977c1d0f20cc052390b6f1d.tar.gz prosody-ae72fdd667dcc0fed977c1d0f20cc052390b6f1d.zip |
mod_http_files: Preserve a trailing / in paths (fixes #639)
Diffstat (limited to 'plugins/mod_http_files.lua')
-rw-r--r-- | plugins/mod_http_files.lua | 3 |
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 |