mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 21:46:57 +03:00
Missing types
svn path=/trunk/netsurf/; revision=10626
This commit is contained in:
parent
693094ced4
commit
d5577b64fa
@ -71,17 +71,25 @@ const char *fetch_filetype(const char *unix_path)
|
||||
switch(dth->dth_GroupID)
|
||||
{
|
||||
case GID_SYSTEM:
|
||||
sprintf(mimetype,"application/%s",dth->dth_BaseName);
|
||||
if(strcmp("directory",dth->dth_BaseName)==0)
|
||||
{
|
||||
strcpy(mimetype,"application/x-netsurf-directory");
|
||||
}
|
||||
else if(strcmp("binary",dth->dth_BaseName)==0)
|
||||
{
|
||||
strcpy(mimetype,"application/octet-stream");
|
||||
}
|
||||
else sprintf(mimetype,"application/%s",dth->dth_BaseName);
|
||||
break;
|
||||
case GID_TEXT:
|
||||
case GID_DOCUMENT:
|
||||
if(strcmp("ascii",dth->dth_BaseName)==0)
|
||||
{
|
||||
sprintf(mimetype,"text/plain",dth->dth_BaseName);
|
||||
strcpy(mimetype,"text/plain");
|
||||
}
|
||||
else if(strcmp("simplehtml",dth->dth_BaseName)==0)
|
||||
{
|
||||
sprintf(mimetype,"text/html",dth->dth_BaseName);
|
||||
strcpy(mimetype,"text/html");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -110,8 +118,6 @@ const char *fetch_filetype(const char *unix_path)
|
||||
|
||||
if(!found) strcpy(mimetype,"text/html"); /* If all else fails */
|
||||
|
||||
//printf("%s: %s\n",unix_path,mimetype);
|
||||
|
||||
return mimetype;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user