Software /
code /
prosody
Diff
plugins/mod_http_files.lua @ 5269:7bc52402966d
mod_http_files: Fix sending Content-Type for index files
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 23 Dec 2012 17:04:44 +0100 |
parent | 5268:69964d1cbe66 |
child | 5688:345761f0c2be |
child | 5716:8a0465de172e |
line wrap: on
line diff
--- a/plugins/mod_http_files.lua Sun Dec 23 11:17:44 2012 +0100 +++ b/plugins/mod_http_files.lua Sun Dec 23 17:04:44 2012 +0100 @@ -117,7 +117,7 @@ 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;