refactor(mime): change function name

This commit is contained in:
2026-01-14 01:43:59 +01:00
parent f9d6975cce
commit aa7a278dce
2 changed files with 5 additions and 2 deletions

View File

@@ -8,6 +8,9 @@ typedef struct mimetype {
const char *type;
} mimetype;
int mime_get_content_type(const char *location_path, char *content_type);
/*
* Retrieve Content Type
*/
int cws_mime_get_ct(const char *location_path, char *content_type);
#endif

View File

@@ -9,7 +9,7 @@
static mimetype mimetypes[] = {{"html", "text/html"}, {"css", "text/css"}, {"js", "application/javascript"},
{"jpg", "image/jpeg"}, {"png", "image/png"}, {"ico", "image/x-icon"}};
int mime_get_content_type(const char *location_path, char *content_type) {
int cws_mime_get_ct(const char *location_path, char *content_type) {
/* Find last occurrence of a string */
char *ptr = strrchr(location_path, '.');
if (ptr == NULL) {