Re: [squid-users] routing upload requests

From: Henrik Nordstrom <henrik@dont-contact.us>
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

Received on Fri Apr 14 2006 - 17:49:55 MDT

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