Software /
code /
prosody
Comparison
plugins/mod_http_files.lua @ 4701:3ce9e1ca9c15
mod_http_files: Log 404 failure reason
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 26 Apr 2012 06:30:29 +0100 |
parent | 4700:63386138e393 |
child | 4703:684ea42ca77a |
comparison
equal
deleted
inserted
replaced
4700:63386138e393 | 4701:3ce9e1ca9c15 |
---|---|
56 end | 56 end |
57 return 403; | 57 return 403; |
58 end | 58 end |
59 local f, err = open(full_path, "rb"); | 59 local f, err = open(full_path, "rb"); |
60 if not f then | 60 if not f then |
61 module:log("warn", "Failed to open file: %s", err); | |
61 return 404; | 62 return 404; |
62 end | 63 end |
63 local data = f:read("*a"); | 64 local data = f:read("*a"); |
64 f:close(); | 65 f:close(); |
65 if not data then | 66 if not data then |