aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http_files.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-12-23 17:04:44 +0100
committerKim Alvefur <zash@zash.se>2012-12-23 17:04:44 +0100
commitbf954791854c49781df32a891749efe880ffe2c2 (patch)
treec06423cffaa215678cc41a093964980d343a7027 /plugins/mod_http_files.lua
parent4c66b3e2842de2c196fd3e3722861ff515e91969 (diff)
downloadprosody-bf954791854c49781df32a891749efe880ffe2c2.tar.gz
prosody-bf954791854c49781df32a891749efe880ffe2c2.zip
mod_http_files: Fix sending Content-Type for index files
Diffstat (limited to 'plugins/mod_http_files.lua')
-rw-r--r--plugins/mod_http_files.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http_files.lua b/plugins/mod_http_files.lua
index f1ae4918..915bec58 100644
--- a/plugins/mod_http_files.lua
+++ b/plugins/mod_http_files.lua
@@ -117,7 +117,7 @@ function serve(opts)
module:log("debug", "Could not open or read %s. Error was %s", full_path, err);
return 403;
end
- local ext = orig_path:match("%.([^./]+)$");
+ local ext = full_path:match("%.([^./]+)$");
local content_type = ext and mime_map[ext];
cache[orig_path] = { data = data; content_type = content_type; etag = etag };
response_headers.content_type = content_type;