feat(mime): add favicon mimetype
This commit is contained in:
@@ -5,11 +5,9 @@
|
||||
|
||||
#include "http/request.h"
|
||||
|
||||
static mimetype mimetypes[] = {{"html", "text/html"},
|
||||
{"css", "text/css"},
|
||||
{"js", "application/javascript"},
|
||||
{"jpg", "image/jpeg"},
|
||||
{"png", "image/png"}};
|
||||
static mimetype mimetypes[] = {
|
||||
{"html", "text/html"}, {"css", "text/css"}, {"js", "application/javascript"},
|
||||
{"jpg", "image/jpeg"}, {"png", "image/png"}, {"ico", "image/x-icon"}};
|
||||
|
||||
int http_get_content_type(char *location_path, char *content_type) {
|
||||
/* Find last occurrence of a string */
|
||||
@@ -25,5 +23,7 @@ int http_get_content_type(char *location_path, char *content_type) {
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(content_type, CWS_HTTP_CONTENT_TYPE - 1, "%s", "Content-Type not supported");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user