httpd.conf options for forcing default mime-type and switch mime-type extensions case sensitivity
walter harms
wharms at bfs.de
Sun Dec 4 21:22:27 UTC 2011
Hi Xeros,
the code looks like this
/* If not found, default is "application/octet-stream" */
found_mime_type = "application/octet-stream";
suffix = strrchr(url, '.');
if (suffix) {
static const char suffixTable[] ALIGN1 =
/* Shorter suffix must be first:
* ".html.htm" will fail for ".htm"
*/
".txt.h.c.cc.cpp\0" "text/plain\0"
/* .htm line must be after .h line */
".htm.html\0" "text/html\0"
".jpg.jpeg\0" "image/jpeg\0"
".gif\0" "image/gif\0"
".png\0" "image/png\0"
/* .css line must be after .c line */
".css\0" "text/css\0"
".wav\0" "audio/wav\0"
".avi\0" "video/x-msvideo\0"
".qt.mov\0" "video/quicktime\0"
".mpe.mpeg\0" "video/mpeg\0"
".mid.midi\0" "audio/midi\0"
".mp3\0" "audio/mpeg\0"
#if 0 /* unpopular */
".au\0" "audio/basic\0"
".pac\0" "application/x-ns-proxy-autoconfig\0"
".vrml.wrl\0" "model/vrml\0"
#endif
/* compiler adds another "\0" here */
;
Htaccess *cur;
the most easy way for you is to change then application/octet-stream above.
using application/octet-stream is default for any mime aware daemon i know,
so i do not think that an additional option will be useful.
I could see this as a new config option so you can set a new "default" for
broken applications.
That takes us the the right way .. complain about the missing application/octet-stream
handling by your supplier. Most likely he is not aware of it.
re,
wh
Am 04.12.2011 21:52, schrieb xeros:
> Hi,
> I use BusyBox (with httpd applet) in TV, not only for web browser but
> also builtin proprietary media player written by TV vendor. This httpd
> instance listens only on localhost address.
>
> I have noticed that there's no option in httpd.conf to set default
> mime-type for unknown files. Unfortunately media player does not accept
> application/octet-stream mime-type so I need to set other mime-type for
> all media files extensions individually. It has it's own one mime-type
> which can be used for all media files to make it play any supported stream.
>
> Would you add httpd.conf option to set default mime-type for unknown
> files instead of application/octet-stream and possibility to use mixed
> case file extensions mime-types being recognised? (for example - mime
> type set to .avi does not apply to .AVI extension).
>
> Thanks in advance.
>
> Regards,
> xeros
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
>
More information about the busybox
mailing list