Bladeren bron

fixed default mimetype,add "json" minetype

fixed default mimetype,add "json" minetype
lizhirui 5 jaren geleden
bovenliggende
commit
1ae4875dfe
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 2 1
      src/wn_mimetype.c

+ 2 - 1
src/wn_mimetype.c

@@ -54,6 +54,7 @@ static const struct webnet_mime_entry mime_tables[] =
     { "tar",	"application/x-tar" },
     { "tar",	"application/x-tar" },
     { "zip",	"application/zip" },
     { "zip",	"application/zip" },
     { "xml",	"text/xml" },
     { "xml",	"text/xml" },
+    { "json",	"application/json" },
     { RT_NULL,  RT_NULL }
     { RT_NULL,  RT_NULL }
 };
 };
 
 
@@ -81,5 +82,5 @@ const char* mime_get_type(const char* url)
     }
     }
 
 
     /* return text/html as default */
     /* return text/html as default */
-    return mime_tables[0].type;
+    return mime_tables[1].type;
 }
 }