|
|
@@ -19,6 +19,7 @@
|
|
|
* Change Logs:
|
|
|
* Date Author Notes
|
|
|
* 2011-08-02 Bernard the first version
|
|
|
+ * 2021-02-18 lizhirui fixed default mimetype,add json minetype
|
|
|
*/
|
|
|
|
|
|
#include <string.h>
|
|
|
@@ -54,6 +55,7 @@ static const struct webnet_mime_entry mime_tables[] =
|
|
|
{ "tar", "application/x-tar" },
|
|
|
{ "zip", "application/zip" },
|
|
|
{ "xml", "text/xml" },
|
|
|
+ { "json", "application/json" },
|
|
|
{ RT_NULL, RT_NULL }
|
|
|
};
|
|
|
|
|
|
@@ -81,5 +83,5 @@ const char* mime_get_type(const char* url)
|
|
|
}
|
|
|
|
|
|
/* return text/html as default */
|
|
|
- return mime_tables[0].type;
|
|
|
+ return mime_tables[1].type;
|
|
|
}
|