]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: acl: Add predefined METH_DELETE, METH_PUT
authorDaniel Schneller <ds@danielschneller.de>
Mon, 11 Apr 2016 15:45:29 +0000 (17:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 12 Apr 2016 09:44:09 +0000 (11:44 +0200)
Adds the missing HTTP verbs DELETE and PUT as predefined ACLs, similar
to GET, POST etc.

doc/configuration.txt
src/acl.c

index ce81183fd7aff674bea534d9190cfbc9783ce26c..9602b37bdd453c1dd6e5c28ec3ed362d2a38fdd8 100644 (file)
@@ -13998,10 +13998,12 @@ HTTP_URL_SLASH   url_beg /                     match URL beginning with "/"
 HTTP_URL_STAR    url     *                     match URL equal to "*"
 LOCALHOST        src 127.0.0.1/8               match connection from local host
 METH_CONNECT     method  CONNECT               match HTTP CONNECT method
+METH_DELETE      method  DELETE                match HTTP DELETE method
 METH_GET         method  GET HEAD              match HTTP GET or HEAD method
 METH_HEAD        method  HEAD                  match HTTP HEAD method
 METH_OPTIONS     method  OPTIONS               match HTTP OPTIONS method
 METH_POST        method  POST                  match HTTP POST method
+METH_PUT         method  PUT                   match HTTP PUT method
 METH_TRACE       method  TRACE                 match HTTP TRACE method
 RDP_COOKIE       req_rdp_cookie_cnt gt 0       match presence of an RDP cookie
 REQ_CONTENT      req_len gt 0                  match data in the request buffer
index b275a246a3e4606fd97623d910adb5cad49baf3b..df83ef4d48b165fd4aaaccf3863d0c19e7e3a346 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -791,10 +791,12 @@ const struct {
        { .name = "HTTP_1.0",       .expr = {"req_ver","1.0",""}},
        { .name = "HTTP_1.1",       .expr = {"req_ver","1.1",""}},
        { .name = "METH_CONNECT",   .expr = {"method","CONNECT",""}},
+       { .name = "METH_DELETE",    .expr = {"method","DELETE",""}},
        { .name = "METH_GET",       .expr = {"method","GET","HEAD",""}},
        { .name = "METH_HEAD",      .expr = {"method","HEAD",""}},
        { .name = "METH_OPTIONS",   .expr = {"method","OPTIONS",""}},
        { .name = "METH_POST",      .expr = {"method","POST",""}},
+       { .name = "METH_PUT",       .expr = {"method","PUT",""}},
        { .name = "METH_TRACE",     .expr = {"method","TRACE",""}},
        { .name = "HTTP_URL_ABS",   .expr = {"url_reg","^[^/:]*://",""}},
        { .name = "HTTP_URL_SLASH", .expr = {"url_beg","/",""}},