Re: [squid-users] req_mime_type + no_cache

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 31 Jan 2005 18:56:51 +0100 (CET)

On Mon, 31 Jan 2005, Jeremy Shaffner wrote:

>
>
>
> On 1/31/05 11:09 AM, "Henrik Nordstrom" <hno@squid-cache.org> wrote:
>
>>> acl zip req_mime_type ^application/zip$
>>> acl exe req_mime_type ^application/octet-stream$
>>> acl msexe req_mime_type ^application/x-msdownload$
>>
>> These mime types is almost never never seen in request entities.
>>
>> I suspect you intended to use the rep_mime_type, not req_mime_type.
>
> Aha. Thank you.
>
>>> no_cache allow zip
>>> no_cache allow exe
>>> no_cache allow msexe
>>> no_cache deny all
>>
>> Note: no_cache works the opposite of what the name claims.. what you deny
>> does not get cached.
>
> Isn't that how I have it written?

What you have written is to allow caching of zip, exe and msexe, deny
caching of everything else.

and with the wrong acl type used for zip, exe and msexe the above becomes
simply "deny caching of everything".

>> Note2: You can merge all of those mime types in a single acl.
>
> Thanks.
>
> After using rep_ instead of req_ it still didn't work. It wasn't until I
> changed:
>
> no_cache allow zip
> no_cache allow exe
> no_cache allow msexe
> no_cache deny all
>
> to:
>
> no_cache deny !zip !exe !msexe
>
> ... that it started working as I wanted. This is semantically different but
> effectively the same isn't it (including the implied allow all)?

Yes.

   allow a
   allow b
   allow c
   deny all

is semantically equivalent to

   deny !a !b !c
   allow all

Regards
Henrik
Received on Mon Jan 31 2005 - 10:56:53 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 07 2005 - 12:59:36 MST