# HG changeset patch # User Kim Alvefur # Date 1356102645 -3600 # Node ID 87f72452a89387d00740fa31ba11cf7b292003f3 # Parent c85c348253bdf8cb6fd3872fc49443b50e90c3ce mod_http_files: Log the error if we can't open or read a file diff -r c85c348253bd -r 87f72452a893 plugins/mod_http_files.lua --- a/plugins/mod_http_files.lua Fri Dec 21 13:37:39 2012 +0500 +++ b/plugins/mod_http_files.lua Fri Dec 21 16:10:45 2012 +0100 @@ -115,10 +115,11 @@ 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("%.([^./]+)$");