Comparison

plugins/mod_httpserver.lua @ 2359:0bed4af40bff

mod_httpserver: Removed a log message.
author Waqas Hussain <waqas20@gmail.com>
date Thu, 10 Dec 2009 16:34:38 +0500
parent 2358:e05934a5c911
child 2361:926905cb777f
comparison
equal deleted inserted replaced
2358:e05934a5c911 2359:0bed4af40bff
51 if not f then return response_404; end 51 if not f then return response_404; end
52 local data = f:read("*a"); 52 local data = f:read("*a");
53 f:close(); 53 f:close();
54 local ext = path:match("%.([^.]*)$"); 54 local ext = path:match("%.([^.]*)$");
55 local mime = mime_map[ext]; -- Content-Type should be nil when not known 55 local mime = mime_map[ext]; -- Content-Type should be nil when not known
56 module:log("warn", "ext: %s, mime: %s", ext or "(nil)", mime or "(nil)");
57 return { 56 return {
58 headers = { ["Content-Type"] = mime; }; 57 headers = { ["Content-Type"] = mime; };
59 body = data; 58 body = data;
60 }; 59 };
61 end 60 end