Re: [squid-users] routing upload requests

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

Received on Fri Apr 14 2006 - 14:03:55 MDT

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