Support image/gif content type

(cherry picked from commit f4b38a62f69d0df2bb5d3a87979e38d76249b80a)
This commit is contained in:
Oliver Jowett 2015-01-15 21:34:58 +00:00
parent 6458cfd2fe
commit c7204ec6ab

View file

@ -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;
}
}