# HG changeset patch # User Kim Alvefur # Date 1457015400 -3600 # Node ID dcc8ed11173c15fc854ea9c33a794212b1298748 # Parent b5b7ae2901e64183e7393ee36933c862ba76b2bd mod_http_files: Don't prepend / to path twice, sanitize path does this already diff -r b5b7ae2901e6 -r dcc8ed11173c plugins/mod_http_files.lua --- a/plugins/mod_http_files.lua Thu Mar 03 15:28:07 2016 +0100 +++ b/plugins/mod_http_files.lua Thu Mar 03 15:30:00 2016 +0100 @@ -95,7 +95,7 @@ end path = sanitized_path; local orig_path = sanitize_path(request.path); - local full_path = base_path .. (path and "/"..path or ""):gsub("/", path_sep); + local full_path = base_path .. (path or ""):gsub("/", path_sep); local attr = stat(full_path:match("^.*[^\\/]")); -- Strip trailing path separator because Windows if not attr then return 404;