feat(mime): add favicon mimetype

This commit is contained in:
2025-10-26 18:44:00 +01:00
parent 1cf2065b87
commit 44a456041c

View File

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