From 360e2a58846cf2dbe41e798e683f658adfa335e6 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 23 Dec 2012 17:04:44 +0100 Subject: mod_http_files: Fix sending Content-Type for index files --- plugins/mod_http_files.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_http_files.lua') 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; -- cgit v1.2.3