Re: [squid-users] custom acl for file upload

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 5 Jan 2005 06:13:47 +0100 (CET)

On Mon, 3 Jan 2005, saravanan ganapathy wrote:

> I restrict the file size upload in squid using
> request_body_max_size 1 MB. But I want to increase the
> limit(say 3 MB) for some sites only.
>
> How to write acl for this?

To do this you would need to implement an external acl check based on the
Content-Length request header as an alternative to request_body_max_size.

Example helper:

#!/bin/sh
while read size limit; do
         if [ "${size}" -gt "${limit}" ]; then
                 echo ERR
         else
                 echo OK
         fi
done

accepts ACLs to be defined with a single argument specifying the file size
limit for this acl.

alternatively you could extend the implementation of the
request_body_max_size to be acl driven.

> Note : I am using squid-2.4.STABLE6-6.7.3. Due to some
> dependency, I am not upgrading to 2.5. So I need the
> solution for my current version itself

Not possible with Squid-2.4.

Regards
Henrik
Received on Tue Jan 04 2005 - 22:13:49 MST

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