On Sat, 4 Apr 1998, Henrik Nordstrom wrote:
> Not without modifying the source. Squid 1.1.X can only select mime types
> based on file extension listed at compile time, not name. 1.2 uses
> regular expressions, and runtime configuration == complete freedom in
> selecting mime type.
Hmm... I actually prefer (for performance reasons) it to be hard-coded in
anyway, and I'm not afraid of the souce :-)
> The relevant part of the 1.1.X source is src/ftpget.c:mime_get_type.
Aha! I should have thought of that :-)
Serves me right for trying it at 3am :-)
> Right after mime_get_type_done: (line 956 in my sources)
>
> if (!type) {
> if (strncasecmp(filename,"readme",6) == 0)
> type = "text/plain";
> }
Thanks! I wasn't expecting some code to do it, just somebody who remebers
off the top of their head where to look. Thanks again!
Michael Samuel,
Surf-Net City - Internet Cafe and Internet Service Providers
Phone: +61 3 9593-9977
E-Mail: <michael@surfdirect.com.au>
WWW: http://www.surfnetcity.com.au/~michael/
Received on Sat Apr 04 1998 - 19:53:30 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:39:35 MST