projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f14ef56
)
mod_http_files: Translate forward slashes to local directory separators
author
Kim Alvefur
<zash@zash.se>
Sat, 26 Sep 2015 17:35:56 +0000
(19:35 +0200)
committer
Kim Alvefur
<zash@zash.se>
Sat, 26 Sep 2015 17:35:56 +0000
(19:35 +0200)
plugins/mod_http_files.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_http_files.lua
b/plugins/mod_http_files.lua
index 9d81f5405b5a01a9cfd96b4b3859b23808eca1d2..9839fed904be405de502550e94e348f84cf14025 100644
(file)
--- 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;