Software /
code /
prosody
Diff
plugins/mod_http_files.lua @ 7982:e30b0cbed472
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 16 Mar 2017 23:49:27 +0100 |
parent | 7978:01aa6344a556 |
child | 7985:6521a51bb718 |
line wrap: on
line diff
--- a/plugins/mod_http_files.lua Sun Mar 12 12:52:55 2017 +0100 +++ b/plugins/mod_http_files.lua Thu Mar 16 23:49:27 2017 +0100 @@ -19,7 +19,7 @@ local base_path = module:get_option_string("http_files_dir", module:get_option_string("http_path")); local cache_size = module:get_option_number("http_files_cache_size", 128); local cache_max_file_size = module:get_option_number("http_files_cache_max_file_size", 4096); -local dir_indices = module:get_option("http_index_files", { "index.html", "index.htm" }); +local dir_indices = module:get_option_array("http_index_files", { "index.html", "index.htm" }); local directory_index = module:get_option_boolean("http_dir_listing"); local mime_map = module:shared("/*/http_files/mime").types; @@ -37,7 +37,7 @@ }; module:shared("/*/http_files/mime").types = mime_map; - local mime_types, err = open(module:get_option_string("mime_types_file", "/etc/mime.types"),"r"); + local mime_types, err = open(module:get_option_path("mime_types_file", "/etc/mime.types", prosody.paths.config), "r"); if mime_types then local mime_data = mime_types:read("*a"); mime_types:close();