aboutsummaryrefslogtreecommitdiffstats
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
commit360e2a58846cf2dbe41e798e683f658adfa335e6 (patch)
treec06423cffaa215678cc41a093964980d343a7027
parent59db48f8cb71226bd12087c8a9148cf0a89c3f32 (diff)
downloadprosody-360e2a58846cf2dbe41e798e683f658adfa335e6.tar.gz
prosody-360e2a58846cf2dbe41e798e683f658adfa335e6.zip
mod_http_files: Fix sending Content-Type for index files
-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;