]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] acl: add REQ_CONTENT to the list of default acls
authorWilly Tarreau <w@1wt.eu>
Sun, 20 Jul 2008 07:29:50 +0000 (09:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 20 Jul 2008 07:29:50 +0000 (09:29 +0200)
With content inspection, checking the presence of data in the
request buffer is very important. It's getting boring to always
add such an ACL, so let's add it by default.

doc/configuration.txt
src/acl.c

index e127132267eaf464956cf7e66a1ceb17ff3c70af..a2132d5cca8b8b7b5c2cfbc42dea5eb9d573c730 100644 (file)
@@ -3956,6 +3956,7 @@ HTTP_URL_ABS     url_reg ^[^/:]*://            match absolute URL with scheme
 HTTP_URL_SLASH   url_beg /                     match URL begining with "/"
 HTTP_URL_STAR    url     *                     match URL equal to "*"
 HTTP_CONTENT     hdr_val(content-length) gt 0  match an existing content-length
+REQ_CONTENT      req_len gt 0                  match data in the request buffer
 ---------------+-----------------------------+---------------------------------
 
 
index 6385c6fd4036407c222b48e4aaba82126ef87a0b..983c0c5585b9fa396943b365699055652da6bbdc 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -758,6 +758,7 @@ const struct {
        { .name = "HTTP_URL_SLASH", .expr = {"url_beg","/",""}},
        { .name = "HTTP_URL_STAR",  .expr = {"url","*",""}},
        { .name = "HTTP_CONTENT",   .expr = {"hdr_val(content-length)","gt","0",""}},
+       { .name = "REQ_CONTENT",    .expr = {"req_len","gt","0",""}},
        { .name = NULL, .expr = {""}}
 };