From c7204ec6ab912ac60d134ccda546a764def4007e Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 15 Jan 2015 21:34:58 +0000 Subject: [PATCH] Support image/gif content type (cherry picked from commit f4b38a62f69d0df2bb5d3a87979e38d76249b80a) --- net_io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net_io.c b/net_io.c index e5a7859..f9bbc0f 100644 --- a/net_io.c +++ b/net_io.c @@ -841,6 +841,7 @@ void writeJsonToFile(const char *file, char * (*generator) (const char *,int*)) #define MODES_CONTENT_TYPE_CSS "text/css;charset=utf-8" #define MODES_CONTENT_TYPE_JSON "application/json;charset=utf-8" #define MODES_CONTENT_TYPE_JS "application/javascript;charset=utf-8" +#define MODES_CONTENT_TYPE_GIF "image/gif" static struct { char *path; @@ -977,6 +978,8 @@ int handleHTTPRequest(struct client *c, char *p) { content_type = MODES_CONTENT_TYPE_CSS; } else if (strstr(ext, ".js")) { content_type = MODES_CONTENT_TYPE_JS; + } else if (strstr(ext, ".gif")) { + content_type = MODES_CONTENT_TYPE_GIF; } }