Re: Ats.: [squid-users] Upload ban by domain and POST/GET size

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 16 Jun 2003 12:51:23 +0200

On Monday 16 June 2003 12.20, Andrius Kriučkovas wrote:

> > As you note the built in request_body_max_size is a bit too
> > limited for your purpose, but you should be able to make a custom
> > acl via external_acl_type for this based on the Content-Length
> > header.
>
> Hi,
>
> Maybe you have exact eamples of this one? I am quite newbie here.
> Doesn't that means that I have to write some sort of app here?

Correct.

As the function you ask for does not exist built into Squid something
needs to be written to implement it. In this case what is required is
a small program which can compare two integers..

This simple shell script will probably work for most purposes

#!/bin/sh
while read length max; do
  if [ "$length" -gt "$max" ]; then
    echo ERR
  else
    echo OK
  fi
done

Regards
Henrik

-- 
Donations welcome if you consider my Free Squid support helpful.
https://www.paypal.com/xclick/business=hno%40squid-cache.org
If you need commercial Squid support or cost effective Squid or
firewall appliances please refer to MARA Systems AB, Sweden
http://www.marasystems.com/, info@marasystems.com
Received on Mon Jun 16 2003 - 04:50:05 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:17:23 MST