diff options
Diffstat (limited to 'plugins/mod_httpserver.lua')
-rw-r--r-- | plugins/mod_httpserver.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/mod_httpserver.lua b/plugins/mod_httpserver.lua index 119ecadc..08328a43 100644 --- a/plugins/mod_httpserver.lua +++ b/plugins/mod_httpserver.lua @@ -52,11 +52,8 @@ function serve_file(path) local data = f:read("*a"); f:close(); local ext = path:match("%.([^.]*)$"); - local mime = mime_map[ext]; - if not mime then - mime = ext and "application/octet-stream" or "text/html"; - end - module:log("warn", "ext: %s, mime: %s", ext, mime); + local mime = mime_map[ext]; -- Content-Type should be nil when not known + module:log("warn", "ext: %s, mime: %s", ext or "(nil)", mime or "(nil)"); return { headers = { ["Content-Type"] = mime; }; body = data; |