netsurf/debug/filetyped.c
James Bursa 1975b5cd1a [project @ 2003-09-27 23:36:34 by bursa]
Implement CSS attribute selectors and parent / preceding combinators.

svn path=/import/netsurf/; revision=324
2003-09-27 23:36:34 +00:00

27 lines
653 B
C

/*
* This file is part of NetSurf, http://netsurf.sourceforge.net/
* Licensed under the GNU General Public License,
* http://www.opensource.org/licenses/gpl-license
* Copyright 2003 James Bursa <bursa@users.sourceforge.net>
*/
#include <stdlib.h>
#include "netsurf/content/fetch.h"
#include "netsurf/utils/log.h"
#include "netsurf/utils/utils.h"
/**
* filetype -- determine the MIME type of a local file
*/
const char *fetch_filetype(const char *unix_path)
{
int l;
LOG(("unix path %s", unix_path));
l = strlen(unix_path);
if (2 < l && strcasecmp(unix_path + l - 3, "css") == 0)
return "text/css";
return "text/html";
}