From aa7a278dceedd713eff60c1930e691dab47f2c7b Mon Sep 17 00:00:00 2001 From: Francesco Date: Wed, 14 Jan 2026 01:43:59 +0100 Subject: [PATCH] refactor(mime): change function name --- include/http/mime.h | 5 ++++- src/http/mime.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/http/mime.h b/include/http/mime.h index d85f42f..0e0347d 100644 --- a/include/http/mime.h +++ b/include/http/mime.h @@ -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 diff --git a/src/http/mime.c b/src/http/mime.c index 88c27c8..6544646 100644 --- a/src/http/mime.c +++ b/src/http/mime.c @@ -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) {