Add SVG to lws_get_mimetype()
authorPatrick Gansterer <paroga@paroga.com>
Thu, 22 Sep 2016 22:04:40 +0000 (00:04 +0200)
committerAndy Green <andy@warmcat.com>
Thu, 22 Sep 2016 22:31:24 +0000 (06:31 +0800)
lib/server.c

index c8a8b4c..7f79ad2 100644 (file)
@@ -315,6 +315,9 @@ lws_get_mimetype(const char *file, const struct lws_http_mount *m)
        if (!strcmp(&file[n - 4], ".txt"))
                return "text/plain";
 
+       if (!strcmp(&file[n - 4], ".svg"))
+               return "image/svg+xml";
+
        if (!strcmp(&file[n - 4], ".ttf"))
                return "application/x-font-ttf";