mirror of
https://github.com/SDL-Hercules-390/hyperion.git
synced 2026-07-26 18:48:41 +02:00
Another mime-type update
git-svn-id: file:///home/jj/hercules.svn/trunk@774 956126f8-22a0-4046-8f4a-272fa8102e63
This commit is contained in:
+9
-5
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user