Re: FTP Mime types

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 04 Apr 1998 19:48:05 +0200

Michael Samuel wrote:

> - Have the mime types as usual, with these exceptions:
> - The default type to application/octet-stream (as usual)
> - Have README* as text/plain, unless another mime type matches it.
>
> Is this possible out-of-the-box (with 1.1.20), and if not, which file(s)
> will I have to modify in the source?

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.

The relevant part of the 1.1.X source is src/ftpget.c:mime_get_type.

Right after mime_get_type_done: (line 956 in my sources)

  if (!type) {
     if (strncasecmp(filename,"readme",6) == 0)
        type = "text/plain";
  }

---
Henrik Nordström
Sparetime Squid Hacker
Received on Sat Apr 04 1998 - 10:03:08 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:39:35 MST