Software /
code /
prosody
Comparison
plugins/mod_http_files.lua @ 7991:35a02ba83af2
mod_http_files: Use path variant of config option API for http_files_dir
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 21 Mar 2017 12:06:52 +0100 |
parent | 7985:6521a51bb718 |
child | 8757:861a7d6c12d8 |
comparison
equal
deleted
inserted
replaced
7988:dc758422d896 | 7991:35a02ba83af2 |
---|---|
14 local open = io.open; | 14 local open = io.open; |
15 local stat = lfs.attributes; | 15 local stat = lfs.attributes; |
16 local build_path = require"socket.url".build_path; | 16 local build_path = require"socket.url".build_path; |
17 local path_sep = package.config:sub(1,1); | 17 local path_sep = package.config:sub(1,1); |
18 | 18 |
19 local base_path = module:get_option_string("http_files_dir", module:get_option_string("http_path")); | 19 local base_path = module:get_option_path("http_files_dir", module:get_option_path("http_path")); |
20 local cache_size = module:get_option_number("http_files_cache_size", 128); | 20 local cache_size = module:get_option_number("http_files_cache_size", 128); |
21 local cache_max_file_size = module:get_option_number("http_files_cache_max_file_size", 4096); | 21 local cache_max_file_size = module:get_option_number("http_files_cache_max_file_size", 4096); |
22 local dir_indices = module:get_option_array("http_index_files", { "index.html", "index.htm" }); | 22 local dir_indices = module:get_option_array("http_index_files", { "index.html", "index.htm" }); |
23 local directory_index = module:get_option_boolean("http_dir_listing"); | 23 local directory_index = module:get_option_boolean("http_dir_listing"); |
24 | 24 |