aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http_files.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-04-24 00:17:15 +0200
committerKim Alvefur <zash@zash.se>2012-04-24 00:17:15 +0200
commit3fd98627c00a102fc7cbb4657be7e872f953b869 (patch)
treeacb22520af18f284c188ccf6011c55f989dc2d86 /plugins/mod_http_files.lua
parent7ca291e03f0485ce227715ce00b787e1586098c9 (diff)
downloadprosody-3fd98627c00a102fc7cbb4657be7e872f953b869.tar.gz
prosody-3fd98627c00a102fc7cbb4657be7e872f953b869.zip
mod_http_files: Rename argument to reflect what it actually is
Diffstat (limited to 'plugins/mod_http_files.lua')
-rw-r--r--plugins/mod_http_files.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_http_files.lua b/plugins/mod_http_files.lua
index bc9cbcd3..437633e7 100644
--- a/plugins/mod_http_files.lua
+++ b/plugins/mod_http_files.lua
@@ -47,8 +47,8 @@ local function preprocess_path(path)
return path;
end
-function serve_file(request, path)
- local response = request.response;
+function serve_file(event, path)
+ local response = event.response;
path = path and preprocess_path(path);
if not path then
response.status = 400;
@@ -57,7 +57,7 @@ function serve_file(request, path)
local full_path = http_base..path;
if stat(full_path, "mode") == "directory" then
if stat(full_path.."/index.html", "mode") == "file" then
- return serve_file(request, path.."/index.html");
+ return serve_file(event, path.."/index.html");
end
response.status = 403;
return response:send(response_403);