Another mime-type update

git-svn-id: file:///home/jj/hercules.svn/trunk@774 956126f8-22a0-4046-8f4a-272fa8102e63
This commit is contained in:
Jan Jaeger
2002-03-29 13:55:45 +00:00
parent e6647aaef0
commit b04214fab0
+9 -5
View File
@@ -38,12 +38,15 @@ extern CGITAB cgidir[];
static CONTYP mime_types[] = {
{ NULL, "text/html" }, /* No suffix entry */
{ NULL, NULL }, /* No suffix entry */
{ "txt", "text/plain" },
{ "gif", "image/gif" },
{ "jcl", "text/plain" },
{ "gif", "image/gif" },
{ "jpg", "image/jpeg" },
{ "css", "text/css" },
{ NULL, "text/html" } }; /* Default suffix entry */
{ "css", "text/css" },
{ "html", "text/html" },
{ "htm", "text/html" },
{ NULL, NULL } }; /* Default suffix entry */
int html_include(WEBBLK *webblk, char *filename)
@@ -397,7 +400,8 @@ static void http_download(WEBBLK *webblk, char *filename)
for(mime_type++;mime_type->suffix
&& strcasecmp(mime_type->suffix,filetype + 1);
mime_type++);
fprintf(webblk->hsock,"Content-Type: %s\n",mime_type->type);
if(mime_type->type)
fprintf(webblk->hsock,"Content-Type: %s\n", mime_type->type);
fprintf(webblk->hsock,"Expires: %s\n", http_timestring(time(NULL)+HTML_STATIC_EXPIRY_TIME));