diff options
author | Kim Alvefur <zash@zash.se> | 2015-09-26 19:35:56 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-09-26 19:35:56 +0200 |
commit | 60ca835146d1b3857be9a82579907afe5449556e (patch) | |
tree | 12066b15cdef9e6b6cc9ec49861e0acaff5c194e /plugins/mod_http_files.lua | |
parent | a29f12e3090d7b6f9360150d51ea840989fca13d (diff) | |
download | prosody-60ca835146d1b3857be9a82579907afe5449556e.tar.gz prosody-60ca835146d1b3857be9a82579907afe5449556e.zip |
mod_http_files: Translate forward slashes to local directory separators
Diffstat (limited to 'plugins/mod_http_files.lua')
-rw-r--r-- | plugins/mod_http_files.lua | 2 |
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; |