From: Henrik Nordstrom <[EMAIL PROTECTED]>
To: azeem ahmad <[EMAIL PROTECTED]>
CC: Squid Users <[email protected]>
Subject: Re: [squid-users] routing upload requests
Date: Fri, 14 Apr 2006 22:03:44 +0200

fre 2006-04-14 klockan 16:02 +0000 skrev azeem ahmad:

> that reg_ex
> i.e.
>
> acl large_upload req_header Content-length [1-9][0-9]{7} [2-9][0-9]{6}
> and
> acl large_upload req_header Content-length ([2-9]|[1-9][0-9])[0-9]{6}


req_header   the ACL matching HTTP request header contents as a regex.

Content-length  the HTTP request header containing the total size of the
data sent to the server.


[1-9][0-9]{7}

A digit 1-9 followed by 7 digits 0-9, i.e. 10000000 and larger.

[2-9][0-9]{6}

A digit 2-9 followed by 6 digits, i.e. 2000000 - 9999999

([2-9]|[1-9][0-9])[0-9]{6}

A digit 2-9 or digit 1-9 followed by another digit 0-9, both followed by
6 additinal digits 0-9. A combination of the above two regex expressions
as a single expression.



regex patterns are true if they appear anywhere in the string matched
against, so the above patterns also matches larger values with more
digits or values with leading zeroes, both of which are simply ignored
by the pattern.


alright
but when
[1-9][0-9]{7}
mean
10000000 to 19999999
then it means it will match any request more than 10000000 Bytes
then why we need another reg_ex as
[2-9][0-9]{6}

Regards
Azeem


Reply via email to