Software /
code /
prosody
Changeset
9463:f7530c846f98
mod_http_files: Rename variable to avoid name clash [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 10 Oct 2018 21:54:12 +0200 |
parents | 9462:6489d75ff1d6 |
children | 9464:eacdafd07217 |
files | plugins/mod_http_files.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_http_files.lua Wed Oct 10 21:53:26 2018 +0200 +++ b/plugins/mod_http_files.lua Wed Oct 10 21:54:12 2018 +0200 @@ -128,9 +128,9 @@ data = data.data; elseif attr.mode == "directory" and path then if full_path:sub(-1) ~= "/" then - local path = { is_absolute = true, is_directory = true }; - for dir in orig_path:gmatch("[^/]+") do path[#path+1]=dir; end - response_headers.location = build_path(path); + local dir_path = { is_absolute = true, is_directory = true }; + for dir in orig_path:gmatch("[^/]+") do dir_path[#dir_path+1]=dir; end + response_headers.location = build_path(dir_path); return 301; end for i=1,#dir_indices do