Skip to content

Commit 7b4e08d

Browse files
committed
Bug 5303: document regexp dialect (#2110)
Squid currently uses the GNU API providing regex_t and regcomp() with POSIX.2 implementation expected. Squid specifically uses/requires the REG_EXTENDED pattern matching - which is commonly referred to as "POSIX extended regex".
1 parent 389c7c4 commit 7b4e08d

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

src/cf.data.pre

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,9 +1217,9 @@ ENDIF
12171217
acl aclname dstdomain [-n] .foo.com ...
12181218
# Destination server from URL [fast]
12191219
acl aclname srcdom_regex [-i] \.foo\.com ...
1220-
# regex matching client name [slow]
1220+
# POSIX extended regex matching client name [slow]
12211221
acl aclname dstdom_regex [-n] [-i] \.foo\.com ...
1222-
# regex matching server [fast]
1222+
# POSIX extended regex matching server [fast]
12231223
#
12241224
# For dstdomain and dstdom_regex a reverse lookup is tried if a IP
12251225
# based URL is used and no match is found. The name "none" is used
@@ -1255,11 +1255,11 @@ ENDIF
12551255
# h1:m1 must be less than h2:m2
12561256

12571257
acl aclname url_regex [-i] ^http:// ...
1258-
# regex matching on whole URL [fast]
1258+
# POSIX extended regex matching on whole URL [fast]
12591259
acl aclname urllogin [-i] [^a-zA-Z0-9] ...
1260-
# regex matching on URL login field
1260+
# POSIX extended regex matching on URL login field
12611261
acl aclname urlpath_regex [-i] \.gif$ ...
1262-
# regex matching on URL path [fast]
1262+
# POSIX extended regex matching on URL path [fast]
12631263

12641264
acl aclname port 80 70 21 0-1024 ...
12651265
# destination TCP port (or port range) of the request [fast]
@@ -1279,11 +1279,12 @@ ENDIF
12791279
acl aclname http_status 200 301 500- 400-403 ...
12801280
# status code in reply [fast]
12811281

1282-
acl aclname browser [-i] regexp ...
1283-
# pattern match on User-Agent header (see also req_header below) [fast]
1282+
acl aclname browser [-i] regex ...
1283+
# POSIX extended regex match on User-Agent header
1284+
# (see also req_header below) [fast]
12841285

1285-
acl aclname referer_regex [-i] regexp ...
1286-
# pattern match on Referer header [fast]
1286+
acl aclname referer_regex [-i] regex ...
1287+
# POSIX extended regex match on Referer header [fast]
12871288
# Referer is highly unreliable, so use with care
12881289

12891290
acl aclname proxy_auth [-i] username ...
@@ -1297,8 +1298,8 @@ ENDIF
12971298
# their parameter syntax and username matching algorithm.
12981299

12991300
acl aclname proxy_auth_regex [-i] username_pattern ...
1300-
# perform http authentication challenge to the client and regex match
1301-
# supplied username [slow]
1301+
# perform http authentication challenge to the client and
1302+
# POSIX extended regex match on supplied username [slow]
13021303
#
13031304
# Will use proxy authentication in forward-proxy scenarios, and plain
13041305
# http authentication in reverse-proxy scenarios
@@ -1346,27 +1347,27 @@ ENDIF
13461347
# or ratio of matches:non-matches (3:5).
13471348

13481349
acl aclname req_mime_type [-i] mime-type ...
1349-
# regex match against the mime type of the request generated
1350+
# POSIX extended regex match against the mime type of the request generated
13501351
# by the client. Can be used to detect file upload or some
13511352
# types HTTP tunneling requests [fast]
13521353
# NOTE: This does NOT match the reply. You cannot use this
13531354
# to match the returned file type.
13541355

13551356
acl aclname req_header header-name [-i] any\.regex\.here
1356-
# regex match against any of the known request headers. May be
1357+
# POSIX extended regex match against any of the known request headers. May be
13571358
# thought of as a superset of "browser", "referer" and "mime-type"
13581359
# ACL [fast]
13591360

13601361
acl aclname rep_mime_type [-i] mime-type ...
1361-
# regex match against the mime type of the reply received by
1362+
# POSIX extended regex match against the mime type of the reply received by
13621363
# squid. Can be used to detect file download or some
13631364
# types HTTP tunneling requests. [fast]
13641365
# NOTE: This has no effect in http_access rules. It only has
13651366
# effect in rules that affect the reply data stream such as
13661367
# http_reply_access.
13671368

13681369
acl aclname rep_header header-name [-i] any\.regex\.here
1369-
# regex match against any of the known reply headers. May be
1370+
# POSIX extended regex match against any of the known reply headers. May be
13701371
# thought of as a superset of "browser", "referer" and "mime-type"
13711372
# ACLs [fast]
13721373

@@ -1390,7 +1391,7 @@ ENDIF
13901391
# syntax and username matching algorithm.
13911392

13921393
acl aclname ext_user_regex [-i] username_pattern ...
1393-
# regex match on username returned by external acl helper [slow]
1394+
# POSIX extended regex match on username returned by external acl helper [slow]
13941395

13951396
acl aclname tag tagvalue ...
13961397
# string match on tag returned by external acl helper [fast]
@@ -1641,7 +1642,7 @@ IF USE_OPENSSL
16411642
# connection, this target is the destination IP address).
16421643

16431644
acl aclname ssl::server_name_regex [-i] \.foo\.com ...
1644-
# regex matches server name obtained from various sources [fast]
1645+
# POSIX extended regex matches server name obtained from various sources [fast]
16451646
#
16461647
# See ssl::server_name for details, including IPv6 address formatting
16471648
# caveats. Use case-insensitive matching (i.e. -i option) to reduce

0 commit comments

Comments
 (0)