From 489ecb25443926b1126c790ca725168a40da06d0 Mon Sep 17 00:00:00 2001 From: Artem Pastukhov Date: Fri, 3 Apr 2015 13:23:33 +0300 Subject: [PATCH] fix %.gz regexp --- httpserver-static.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpserver-static.lua b/httpserver-static.lua index f441a93..e7ca343 100644 --- a/httpserver-static.lua +++ b/httpserver-static.lua @@ -7,7 +7,7 @@ local function getMimeType(ext) -- 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 + if ext:find("%.gz$") then ext = ext:sub(1, -4) gzip = true end