From: Daniel Schneller Date: Mon, 11 Apr 2016 15:45:29 +0000 (+0200) Subject: MINOR: acl: Add predefined METH_DELETE, METH_PUT X-Git-Tag: v1.7-dev3~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ff96c7a62f181fe88be7af5b4ff1a522d663be6;p=thirdparty%2Fhaproxy.git MINOR: acl: Add predefined METH_DELETE, METH_PUT Adds the missing HTTP verbs DELETE and PUT as predefined ACLs, similar to GET, POST etc. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index ce81183fd7..9602b37bdd 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -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 diff --git a/src/acl.c b/src/acl.c index b275a246a3..df83ef4d48 100644 --- 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","/",""}},