diff options
Diffstat (limited to 'plugins/mod_http_files.lua')
-rw-r--r-- | plugins/mod_http_files.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_http_files.lua b/plugins/mod_http_files.lua index 43094eb4..2e906b70 100644 --- a/plugins/mod_http_files.lua +++ b/plugins/mod_http_files.lua @@ -115,10 +115,11 @@ function serve_file(event, path) else local f, err = open(full_path, "rb"); if f then - data = f:read("*a"); + data, err = f:read("*a"); f:close(); end if not data then + module:log("debug", "Could not open or read %s. Error was %s", full_path, err); return 403; end local ext = path:match("%.([^./]+)$"); |