khttpd until-now private patch
RFC PATCH 1/1 khttpd until-now private patch
Hello,
this is my first try to submit a patch.
I have looked through khttpd and saw some MIME types but others haven't been there, especially I saw that one could not serve plain binary files. So I have added some MIME types... a /proc interface was nice, though.
Secondly I have allowed myself to update the RFC821 date-time handling. You do not need to add the day of the week field, and according to RFC282(1,2) UTC should be served ad +0000 (or -0000 if it is not 100% secure that it really is UTC,
or if UTC is not local time, however I decided to do +0000).
Feel free to correct me if I am wrong, if not I would like to see this in the stock kernel.
-mirabilos
Here is the patch:
net/khttpd/main.c Mon May 14 15:58:04 2001 renamed from net/khttpd/main.c Mon May 14 15:16:14 2001 +16 -0
@@ -50,6 +50,12 @@ * ****************************************************************/ +/** ChangeLog: + 2001-05-14 Thorsten Glaser <[email protected]> + Add more MIME types for widely-used + files (mostly binary) +*/ + static int errno; #define __KERNEL_SYSCALLS__
@@ -371,7 +377,17 @@ AddMimeType(".deb","application/x-debian-package"); AddMimeType("lass","application/x-java"); AddMimeType(".mp3","audio/mpeg"); + AddMimeType(".mpg","video/mpeg"); AddMimeType(".txt","text/plain"); + AddMimeType(".asc","text/plain; charset=ISO_646.irv:1991"); + AddMimeType(".bin","application/octet-stream"); + AddMimeType(".com","application/octet-stream"); + AddMimeType(".exe","application/octet-stream"); + AddMimeType(".lzh","application/octet-stream"); + /* because not officially registered and some browser are buggy */ + AddMimeType(".bz2","application/x-bzip2"); + AddMimeType(".tbz","application/x-gtar"); + AddMimeType(".cbz","application/x-cpio"); AddDynamicString(".."); AddDynamicString("cgi-bin");
net/khttpd/rfc_time.c Mon May 14 15:55:27 2001 renamed from net/khttpd/rfc_time.c Fri Feb 9 19:29:44 2001 +41 -46
139 lines not on this page · raw message