From dd7aa55d96b79a24516a2a062bd832affab7d260 Mon Sep 17 00:00:00 2001 From: Artem Pastukhov Date: Thu, 2 Apr 2015 16:09:38 +0300 Subject: [PATCH] Fixes --- httpserver-static.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/httpserver-static.lua b/httpserver-static.lua index b4acc44..ac7556b 100644 --- a/httpserver-static.lua +++ b/httpserver-static.lua @@ -6,6 +6,7 @@ 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"} + -- add comressed flag if file ends with gz if ext:find("gz$") then ext = ext:sub(1, -4) gzip = true