Diff

plugins/mod_http.lua @ 8972:0b254439d451

mod_http: Rename argument to avoid name clash with outer scope [luacheck]
author Kim Alvefur <zash@zash.se>
date Fri, 06 Jul 2018 00:15:10 +0200
parent 8971:e59207c909c0
child 9335:2dc7490899ae
line wrap: on
line diff
--- a/plugins/mod_http.lua	Fri Jul 06 00:14:47 2018 +0200
+++ b/plugins/mod_http.lua	Fri Jul 06 00:15:10 2018 +0200
@@ -108,9 +108,9 @@
 				elseif event_name:sub(-2, -1) == "/*" then
 					local base_path_len = #event_name:match("/.+$");
 					local _handler = handler;
-					handler = function (event)
-						local path = event.request.path:sub(base_path_len);
-						return _handler(event, path);
+					handler = function (_event)
+						local path = _event.request.path:sub(base_path_len);
+						return _handler(_event, path);
 					end;
 					module:hook_object_event(server, event_name:sub(1, -3), redir_handler, -1);
 				elseif event_name:sub(-1, -1) == "/" then