From 243ab35720c987c1975d09923d3a87870402a3f6 Mon Sep 17 00:00:00 2001 From: Artem Pastukhov Date: Tue, 21 Apr 2015 09:34:05 +0300 Subject: [PATCH] Add xml mime type --- httpserver-header.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpserver-header.lua b/httpserver-header.lua index ba4afd4..6e7c5f3 100644 --- a/httpserver-header.lua +++ b/httpserver-header.lua @@ -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)