[Chilli] [PATCH] redir.c: Additional file extensions / mime types for redir_main()
Jan-Benedict Glaw
jbglaw at getslash.de
Fri Nov 29 10:27:37 UTC 2013
Hi!
I'm currently doing some tests with Chilli and couldn't serve an
already existing login page without this patch:
Index: src/redir.c
===================================================================
--- src/redir.c (revision 490)
+++ src/redir.c (working copy)
@@ -3483,6 +3483,10 @@
else if (!strcmp(filename + (namelen - 4), ".ogv")) ctype = "video/ogg";
else if (!strcmp(filename + (namelen - 4), ".png")) ctype = "image/png";
else if (!strcmp(filename + (namelen - 4), ".swf")) ctype = "application/x-shockwave-flash";
+ else if (!strcmp(filename + (namelen - 4), ".svg")) ctype = "image/svg+xml";
+ else if (!strcmp(filename + (namelen - 5), ".woff")) ctype = "application/font-woff";
+ else if (!strcmp(filename + (namelen - 4), ".ttf")) ctype = "application/x-font-ttf";
+ else if (!strcmp(filename + (namelen - 4), ".eot")) ctype = "application/vnd.ms-fontobject";
else if (!strcmp(filename + (namelen - 4), ".chi")){ ctype = "text/html"; parse = 1; }
else if (!strcmp(filename + (namelen - 4), ".cjs")){ ctype = "text/javascript"; parse = 1; }
else if (!strcmp(filename + (namelen - 4), ".dat")){ ctype = "application/x-ns-proxy-autoconfig";
Could be useful for other people, too. (Though in the long term, it
would probably be an advantage to have this table as a plain
configuration file...)
MfG, JBG
--
Getslash GmbH, Bahnhofstraße 16, 59302 Oelde
Tel: +49-2522-834349-5 Fax: +49-2522-834349-1
http://www.getslash.de Mobil: +49-152-33822499
Sitz der Gesellschaft: Oelde
Handelsregister: Amtsgericht Münster, HRB 11911
Ust-Id-Nr.: DE 815060326
Geschäftsführung: Andre Peitz, Tobias Hanisch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.coova.org/pipermail/chilli/attachments/20131129/3f8f0e9d/attachment.pgp>
More information about the Chilli
mailing list