# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1356278684 -3600
# Node ID 7bc52402966d55577306e744c19a4242357bf038
# Parent  69964d1cbe6624b4f9225972f99c6d8dbad1158c
mod_http_files: Fix sending Content-Type for index files

diff -r 69964d1cbe66 -r 7bc52402966d plugins/mod_http_files.lua
--- 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;