From c545bb4b42dff8bfd4c288e330f52848ec2df6c4 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Fri, 15 Feb 2013 23:38:27 +0000 Subject: Identify JavaScript by extension as a fallback --- amiga/filetype.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'amiga/filetype.c') diff --git a/amiga/filetype.c b/amiga/filetype.c index 7b6805da7..d69f20bad 100644 --- a/amiga/filetype.c +++ b/amiga/filetype.c @@ -133,6 +133,10 @@ const char *fetch_filetype(const char *unix_path) strcpy(mimetype,"text/html"); found = TRUE; } + if(strncmp(unix_path + strlen(unix_path) - 3, ".js", 3) == 0) { + strcpy(mimetype,"application/javascript"); + found = TRUE; + } } if(!found) strcpy(mimetype,"text/plain"); /* If all else fails */ -- cgit v1.2.3