Comparison

plugins/mod_http_files.lua @ 12597:ba05f7e5f2a2 0.12

mod_http_files: Log warning about legacy modules using mod_http_files It is time. Most community modules should have been adjusted to work with the new (net.http.files) way. At some point this usage should be prevented. Related to #1765
author Kim Alvefur <zash@zash.se>
date Sun, 17 Jul 2022 17:05:28 +0200
parent 12387:05c250fa335a
child 12977:74b9e05af71e
comparison
equal deleted inserted replaced
12593:1832b6c9c6ed 12597:ba05f7e5f2a2
72 opts.cache_max_file_size = cache_max_file_size; 72 opts.cache_max_file_size = cache_max_file_size;
73 end 73 end
74 if opts.index_files == nil then 74 if opts.index_files == nil then
75 opts.index_files = dir_indices; 75 opts.index_files = dir_indices;
76 end 76 end
77 -- TODO Crank up to warning 77 module:log("warn", "%s should be updated to use 'net.http.files' instead of mod_http_files", get_calling_module());
78 module:log("debug", "%s should be updated to use 'net.http.files' instead of mod_http_files", get_calling_module());
79 return fileserver.serve(opts); 78 return fileserver.serve(opts);
80 end 79 end
81 80
82 function wrap_route(routes) 81 function wrap_route(routes)
83 module:log("debug", "%s should be updated to use 'net.http.files' instead of mod_http_files", get_calling_module()); 82 module:log("debug", "%s should be updated to use 'net.http.files' instead of mod_http_files", get_calling_module());