Re: [squid-users] Mime.conf

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 19 Jan 2010 14:55:46 +1300

On Mon, 18 Jan 2010 13:18:20 -0500, Jason Spegal <jspegal_at_comcast.net>
wrote:
> Alrighty. Did some more research and found a solution to my problem
> which leads to another issue.
>
> My problem: I was trying to serve a proxy auto configuration file
> (wpad.dat) from an internal webserver (http://wpad/). When the client
> down the pipe after squid picked it up the file was served with the mime

> type chemical/x-mopac-input. When I went direct to the webserver it
> served the correct mime type (which I had forced it to).
>
> Solution: On Gentoo squid is using the /etc/mime.types file to guess the

> mime type instead of what the remote webserver is saying the file is. I

Point 1: Squid does not do that. Does not use mime.types at all.

Content-Type headers are passed through unchanged from what is received
unless administratively changed by header_replace.

> fixed the file which I also noticed has several other issues answering
> my other other issue, my is 95% of my data being caught in the catch all

> refresh_pattern instead of the mime type ones.

Point 2: Squid does not accept mime types in the refresh_pattern
directive.

Are you _sure_ that:
 * the PAC file is not cached with old headers from before your changes?
 * the PAC file is actually being fetched from the web server you are
expecting?
 * this is an official build of Squid?
 * nobody has applied third-party patches to it?
(none of the official Gentoo patches change mime.types.
http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/)

What headers does this produce when run on the Squid box?
  squidclient -v -h wpad -p 80 /wpad.dat

>
> Of note for other Gentoo & Debian users: From mime.types # This file is

> part of the app-misc/mime-types package, which is based on debian's
> "mime-support".
>
> So my question is now; how do I force squid to use the mime-type
> delivered by the remote webserver without killing mime.types and thus
> breaking my system in new and unexpected ways?

The official releases of Squid pass content-type headers through
unchanged. Something is broken.

>
> On 1/15/2010 8:22 PM, Amos Jeffries wrote:
>> Jason Spegal wrote:
>>> Is mime.conf what is used by refresh_pattern when mime types are used
>>> for the regex?
>>
>> No.
>>
>> refresh_pattern uses a text regex against the requested URL string.
>>
>> mime.conf is used by FTP and Gopher directory display to show the
icons.
>>

Amos
Received on Tue Jan 19 2010 - 01:55:52 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 19 2010 - 12:00:03 MST