refactor(mime): change function name
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user