aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-09-26 19:35:56 +0200
committerKim Alvefur <zash@zash.se>2015-09-26 19:35:56 +0200
commit3945d3f2f8ad4eb04d9acc7c3b8fccb18e37dae1 (patch)
tree12066b15cdef9e6b6cc9ec49861e0acaff5c194e
parentdb90c1c0787046114aa61b004af941581f2cd6d8 (diff)
downloadprosody-3945d3f2f8ad4eb04d9acc7c3b8fccb18e37dae1.tar.gz
prosody-3945d3f2f8ad4eb04d9acc7c3b8fccb18e37dae1.zip
mod_http_files: Translate forward slashes to local directory separators
-rw-r--r--plugins/mod_http_files.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http_files.lua b/plugins/mod_http_files.lua
index 9d81f540..9839fed9 100644
--- a/plugins/mod_http_files.lua
+++ b/plugins/mod_http_files.lua
@@ -61,7 +61,7 @@ function serve(opts)
local function serve_file(event, path)
local request, response = event.request, event.response;
local orig_path = request.path;
- local full_path = base_path .. (path and "/"..path or "");
+ local full_path = base_path .. (path and "/"..path or ""):gsub("/", path_sep);
local attr = stat(full_path:match("^.*[^\\/]")); -- Strip trailing path separator because Windows
if not attr then
return 404;