summaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
Diffstat (limited to 'debug')
-rw-r--r--debug/filetyped.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/debug/filetyped.c b/debug/filetyped.c
index 1695a1c18..283c4d142 100644
--- a/debug/filetyped.c
+++ b/debug/filetyped.c
@@ -16,8 +16,10 @@
const char *fetch_filetype(const char *unix_path)
{
+ int l;
LOG(("unix path %s", unix_path));
- if (strcasecmp(unix_path, "home/james/Projects/netsurf/CSS") == 0)
+ l = strlen(unix_path);
+ if (2 < l && strcasecmp(unix_path + l - 3, "css") == 0)
return "text/css";
return "text/html";
}