Hi! I'm having some problems with squid and servers that don't send along the correct mime-type for *.ico files.
Many sites use a line like <link rel="SHORTCUT ICON" href="http://gmane.org/favicon.ico"> in the <head> of their HTML. This icon comes up in various places in modern browsers, such as associating them with bookmarks, displaying them in the URL input bar, and in tabs of tabbed browsers, such as epiphany and firefox. The problem is that squid seems to get confused by servers that don't include the "type" property of the <link> tag. HTML authors should be using a line along the lines of <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> but they don't. Many servers aren't set up to serve *.ico as anything special either, so they send it as text/plain. Now, herein lies the problem. squidclient has the following to say about the matter: squidclient http://www.gmane.org/favicon.ico HTTP/1.0 200 OK Date: Mon, 25 Oct 2004 19:41:14 GMT Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 Last-Modified: Sat, 11 May 2002 01:21:27 GMT ETag: "84013-1cee-3cdc7217" Accept-Ranges: bytes Content-Length: 7521 Content-Type: text/plain; charset=iso-8859-1 X-Cache: MISS from puritan.pcp.ath.cx X-Cache-Lookup: MISS from puritan.pcp.ath.cx:3128 Proxy-Connection: close : : /* binary data stripped */ % squidclient http://www.gmane.org/favicon.ico HTTP/1.0 200 OK Date: Mon, 25 Oct 2004 19:41:14 GMT Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 Last-Modified: Sat, 11 May 2002 01:21:27 GMT ETag: "84013-1cee-3cdc7217" Accept-Ranges: bytes Content-Length: 7521 Content-Type: text/plain; charset=iso-8859-1 Age: 8 X-Cache: HIT from puritan.pcp.ath.cx X-Cache-Lookup: HIT from puritan.pcp.ath.cx:3128 Proxy-Connection: close : : /* binary data stripped */ Now, what can I do about this? The icon becomes garbled and I'm guessing that this is so since the Content-Type isn't right. The Content-Length isn't right either: % wget http://www.gmane.org/favicon.ico --21:44:09-- http://www.gmane.org/favicon.ico => `favicon.ico' Resolving www.gmane.org... 80.91.229.2 Connecting to www.gmane.org[80.91.229.2]:80... connected. HTTP request sent, awaiting response... 200 OK Length: 7,406 [text/plain] : : Is there anything I can do? I added a line for .ico$ in /etc/squid/mime.conf: \.ico$ image/x-icon anthony-image.gif - image +download but that doesn't help. Please, save me from these garbled favicons! Thanks, nikolai -- ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka ::: ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden ::: ::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 ::: main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
