Merge pull request #17 from pastukhov/master

Add xml mime type
This commit is contained in:
Marcos 2015-04-21 09:14:53 -05:00
commit 7a1a60f383

View File

@ -15,7 +15,7 @@ return function (connection, code, extension)
local function getMimeType(ext)
local gzip = false
-- A few MIME types. Keep list short. If you need something that is missing, let's add it.
local mt = {css = "text/css", gif = "image/gif", html = "text/html", ico = "image/x-icon", jpeg = "image/jpeg", jpg = "image/jpeg", js = "application/javascript", json = "application/json", png = "image/png"}
local mt = {css = "text/css", gif = "image/gif", html = "text/html", ico = "image/x-icon", jpeg = "image/jpeg", jpg = "image/jpeg", js = "application/javascript", json = "application/json", png = "image/png", xml = "text/xml"}
-- add comressed flag if file ends with gz
if ext:find("%.gz$") then
ext = ext:sub(1, -4)