Re: [squid-users] routing upload requests

From: azeem ahmad <azeem81@dont-contact.us>
Date: Mon, 17 Apr 2006 20:53:28 +0000

>From: Henrik Nordstrom <henrik@henriknordstrom.net>
>To: azeem ahmad <azeem81@msn.com>
>CC: squid-users@squid-cache.org
>Subject: Re: [squid-users] routing upload requests
>Date: Sat, 15 Apr 2006 01:49:45 +0200
>
>fre 2006-04-14 klockan 23:34 +0000 skrev azeem ahmad:
>
> > alright
> > but when
> > [1-9][0-9]{7}
> > mean
> > 10000000 to 19999999
> > then it means it will match any request more than 10000000 Bytes
>
>yes, as even 54326789012345123 contains at least one of the above
>patterns.. (actually several possible matches, 10 to be exact, but one
>is sufficient for the acl to be true and regex is satisfied when finding
>the first match "54326789")
>
> > then why we need another reg_ex as
> > [2-9][0-9]{6}
>
>Because the question was about requests larger than 2 MB (approximately
>2000000 bytes), so the acl need to match
>
> 2XXXXXX
> 3XXXXXX
> ...
> 9XXXXXX
> 1XXXXXXX
> 2XXXXXXX
> ....
>
>but not
> 1XXXXXX
>
>as that is below 2 MB.
>
>The first regex matches anything from 10000000 (10 MB) and up.
>
>The second regex takes care of the range 2000000 - 9999999 (2MB to
>10MB)
>
>Side note: the second regex also matches many larger values also matched
>by the first, but not all. For example it matches 4000000000, but not
>10000000. But all these is taken care of with the first regex and does
>not matter.
>
>
>Regards
>Henrik

Alright, i got it
mean the two acls are needed because of >2Mb. and if i make it simple to one
mb then i need this

acl large_upload req_header Content-length [1-9][0-9]{6}
cache_peer_access peer2 deny !large_upload

but why it adopted a parser like style, why just a staright definition is
available like in may other options of squid
for example
cache_mem 32mb

Regards
Azeem
Received on Mon Apr 17 2006 - 14:53:31 MDT

This archive was generated by hypermail pre-2.1.9 : Mon May 01 2006 - 12:00:02 MDT