Software /
code /
prosody
Changeset
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 |
parents | 5268:69964d1cbe66 |
children | 5270:20e14961f630 |
files | plugins/mod_http_files.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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;