Re: [squid-users] Custom Error Message for reply_body_max_size

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 23 Mar 2009 11:35:17 +1200 (NZST)

>
> Dear Squid Techies,
>
> I have declared 5 reply_body_max_size for different groups, restricting
> them on different limit, say 100MB, 75MB, 2MB, 2MB, 1MB accordingly.
>
> I would like to give all these groups different error messages based on
> which group of users is trying to download more. Right now, for all these
> groups, system is delivering ERR_TOO_BIG located in
> /usr/share/squid/errors/English directory.
>
> when i tried, deny_info need an acl to mention along with it. But here the
> case is different.. the following is an example of reply_body_max_size in
> my system...
>
> reply_body_max_size 104857600 allow power_acl
> # deny_info MAX_POWERACL ---> tried this
> # deny_info MAX_POWERACL power_acl ---> tried this too
> reply_body_max_size 78643200 allow download_surfers_acl
> and so on...
>
> Thanks in Advance...
>

Nice idea, however there is no easy answer. It will likely take a redesign
to make this possible:

1) the ACLs are tested mid-stream when content-length is missing from the
headers. Thus no error page at all can be returned on many requests.

2) This part of squid is a black-box lookup to pull the theoretical
maximum body size. The ACL lookups and the code which compares the object
size to the expected max are not related.

Amos
Received on Sun Mar 22 2009 - 23:35:24 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 23 2009 - 12:00:02 MDT