summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2013-02-15 23:38:27 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2013-02-15 23:38:27 +0000
commitc545bb4b42dff8bfd4c288e330f52848ec2df6c4 (patch)
tree841e994f3b53292f0f45e2a0b354a07d64ea5031 /amiga
parent05969e52ef8aded4c0cb3c228cceffa8da0e94a9 (diff)
downloadnetsurf-c545bb4b42dff8bfd4c288e330f52848ec2df6c4.tar.gz
netsurf-c545bb4b42dff8bfd4c288e330f52848ec2df6c4.tar.bz2
Identify JavaScript by extension as a fallback
Diffstat (limited to 'amiga')
-rw-r--r--amiga/filetype.c4
1 files changed, 4 insertions, 0 deletions
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 */