MINOR: http: add new direction-explicit sample fetches for headers and cookies

Since "hdr" and "cookie" were ambiguously referring to the request or response
depending on the context, we need a way to explicitly specify the direction.
By prefixing the fetches names with "req." and "res.", we can now restrict such
fetches to the appropriate direction. At the moment the fetches are explicitly
declared by later we might think about having an automatic match when "req." or
"res." appears. These explicit fetches are now used by the relevant ACLs.
This commit is contained in:
Willy Tarreau 2013-01-14 15:56:36 +01:00
parent 9baae63d8d
commit 18ed2569f5
2 changed files with 202 additions and 122 deletions

View File

@ -9613,10 +9613,7 @@ The list of currently supported pattern fetch functions is the following :
keyword description for more information on possible caveats. keyword description for more information on possible caveats.
cook([<name>]) cook([<name>])
This extracts the last occurrence of the cookie name <name> on a This is an alias for "req.cook".
"Cookie" header line from the request, and returns its value as
string. If no name is specified, the first cookie value is
returned.
cookie([<name>]) cookie([<name>])
This extracts the last occurrence of the cookie name <name> on a This extracts the last occurrence of the cookie name <name> on a
@ -9631,15 +9628,10 @@ The list of currently supported pattern fetch functions is the following :
See also : "appsession" See also : "appsession"
cook_cnt([<name>]) cook_cnt([<name>])
Returns an integer value representing the number of occurrences of This is an alias for "req.cook_cnt".
the cookie <name> in the request, or all cookies if <name> is not
specified.
cook_val([<name>]) cook_val([<name>])
This extracts the last occurrence of the cookie name <name> on a This is an alias for "req.cook_val".
"Cookie" header line from the request, and converts its value to
an integer which is returned. If no name is specified, the first
cookie value is returned.
dst This is the destination IPv4 address of the session on the dst This is the destination IPv4 address of the session on the
client side, which is the address the client connected to. client side, which is the address the client connected to.
@ -9683,36 +9675,18 @@ The list of currently supported pattern fetch functions is the following :
logs using a log-format directive. logs using a log-format directive.
hdr(<name>[,<occ>]) hdr(<name>[,<occ>])
This extracts the last occurrence of header <name> in an HTTP This is an alias for "req.hdr" or "res.hdr" depending whether it
request. Optionally, a specific occurrence might be specified as is used on the request path or the response path. Since it is
a position number. Positive values indicate a position from the ambiguous, it is recommended not to use this form.
first occurrence, with 1 being the first one. Negative values
indicate positions relative to the last one, with -1 being the
last one. A typical use is with the X-Forwarded-For header once
converted to IP, associated with an IP stick-table.
hdr_cnt([<name>]) hdr_cnt([<name>])
Returns an integer value representing the number of occurrences This is an alias for "req.hdr_cnt".
of request header field name <name>, or the total number of
header fields if <name> is not specified.
hdr_ip([<name>[,<occ>]]) hdr_ip([<name>[,<occ>]])
This extracts the last occurrence of header <name> in an HTTP This is an alias for "req.hdr_ip".
request, converts it to an IPv4 or IPv6 address and returns this
address. Optionally, a specific occurrence might be specified as
a position number. Positive values indicate a position from the
first occurrence, with 1 being the first one. Negative values
indicate positions relative to the last one, with -1 being the
last one. A typical use is with the X-Forwarded-For header.
hdr_val([<name>[,<occ>]]) hdr_val([<name>[,<occ>]])
This extracts the last occurrence of header <name> in an HTTP This is an alias for "req.hdr_val".
request, and converts it to an integer value. Optionally, a
specific occurrence might be specified as a position number.
Positive values indicate a position from the first occurrence,
with 1 being the first one. Negative values indicate positions
relative to the last one, with -1 being the last one. A typical
use is with the X-Forwarded-For header.
http_auth(<userlist>) http_auth(<userlist>)
http_auth_group(<userlist>) http_auth_group(<userlist>)
@ -9816,16 +9790,71 @@ The list of currently supported pattern fetch functions is the following :
with "server" lines having the "ssl" option. This is mostly used with "server" lines having the "ssl" option. This is mostly used
in ACL. in ACL.
req_len Returns an integer value corresponding to the number of bytes req.cook([<name>])
present in the request buffer. This is mostly used in ACL. This extracts the last occurrence of the cookie name <name> on a
"Cookie" header line from the request, and returns its value as
string. If no name is specified, the first cookie value is
returned.
req_proto_http req.cook_cnt([<name>])
Returns an integer value representing the number of occurrences of
the cookie <name> in the request, or all cookies if <name> is not
specified.
req.cook_val([<name>])
This extracts the last occurrence of the cookie name <name> on a
"Cookie" header line from the request, and converts its value to
an integer which is returned. If no name is specified, the first
cookie value is returned.
req.hdr(<name>[,<occ>])
This extracts the last occurrence of header <name> in an HTTP
request. Optionally, a specific occurrence might be specified as
a position number. Positive values indicate a position from the
first occurrence, with 1 being the first one. Negative values
indicate positions relative to the last one, with -1 being the
last one. A typical use is with the X-Forwarded-For header once
converted to IP, associated with an IP stick-table.
req.hdr_cnt([<name>])
Returns an integer value representing the number of occurrences
of request header field name <name>, or the total number of
header fields if <name> is not specified.
req.hdr_ip([<name>[,<occ>]])
This extracts the last occurrence of header <name> in an HTTP
request, converts it to an IPv4 or IPv6 address and returns this
address. Optionally, a specific occurrence might be specified as
a position number. Positive values indicate a position from the
first occurrence, with 1 being the first one. Negative values
indicate positions relative to the last one, with -1 being the
last one. A typical use is with the X-Forwarded-For header.
req.hdr_val([<name>[,<occ>]])
This extracts the last occurrence of header <name> in an HTTP
request, and converts it to an integer value. Optionally, a
specific occurrence might be specified as a position number.
Positive values indicate a position from the first occurrence,
with 1 being the first one. Negative values indicate positions
relative to the last one, with -1 being the last one. A typical
use is with the X-Forwarded-For header.
req.proto_http
Returns true when data in the request buffer look like HTTP and Returns true when data in the request buffer look like HTTP and
correctly parses as such. It is the same parser as the common correctly parses as such. It is the same parser as the common
HTTP request parser which is used so there should be no HTTP request parser which is used so there should be no
surprises. This test may be used to report the protocol in TCP surprises. This test may be used to report the protocol in TCP
logs. logs.
req.ver Returns the version string from the HTTP request, for example
"1.1". This can be useful for logs, but is mostly there for ACL.
req_len Returns an integer value corresponding to the number of bytes
present in the request buffer. This is mostly used in ACL.
req_proto_http
This is an alias for "req_proto_http".
req_ssl_hello_type req_ssl_hello_type
Returns an integer value containing the type of the SSL hello Returns an integer value containing the type of the SSL hello
message found in the request buffer. Note that this only applies message found in the request buffer. Note that this only applies
@ -9849,11 +9878,62 @@ The list of currently supported pattern fetch functions is the following :
data layer, so this will not work with "bind" lines having the data layer, so this will not work with "bind" lines having the
"ssl" option. This is mostly used in ACL. "ssl" option. This is mostly used in ACL.
req_ver Returns the version string from the HTTP request, for example req_ver This is an alias for "req.ver".
res.cook([<name>])
This extracts the last occurrence of the cookie name <name> on a
"Set-Cookie" header line from the response, and returns its
value as string. If no name is specified, the first cookie value
is returned.
res.cook_cnt([<name>])
Returns an integer value representing the number of occurrences of
the cookie <name> in the response, or all cookies if <name> is not
specified.
res.cook_val([<name>])
This extracts the last occurrence of the cookie name <name> on a
"Set-Cookie" header line from the response, and converts its
value to an integer which is returned. If no name is specified,
the first cookie value is returned.
res.hdr(<name>[,<occ>])
This extracts the last occurrence of header <name> in an HTTP
response. Optionally, a specific occurrence might be specified
as a position number. Positive values indicate a position from
the first occurrence, with 1 being the first one. Negative
values indicate positions relative to the last one, with -1
being the last one. This can be useful to learn some data into
a stick-table.
res.hdr_cnt([<name>])
Returns an integer value representing the number of occurrences
of response header field name <name>, or the total number of
header fields if <name> is not specified.
res.hdr_ip([<name>[,<occ>]])
This extracts the last occurrence of header <name> in an HTTP
response, convert it to an IPv4 or IPv6 address and returns this
address. Optionally, a specific occurrence might be specified as
a position number. Positive values indicate a position from the
first occurrence, with 1 being the first one. Negative values
indicate positions relative to the last one, with -1 being the
last one. This can be useful to learn some data into a stick
table.
res.hdr_val([<name>[,<occ>]])
This extracts the last occurrence of header <name> in an HTTP
response, and converts it to an integer value. Optionally, a
specific occurrence might be specified as a position number.
Positive values indicate a position from the first occurrence,
with 1 being the first one. Negative values indicate positions
relative to the last one, with -1 being the last one. This can
be useful to learn some data into a stick table.
res.ver Returns the version string from the HTTP response, for example
"1.1". This can be useful for logs, but is mostly there for ACL. "1.1". This can be useful for logs, but is mostly there for ACL.
resp_ver Returns the version string from the HTTP response, for example resp_ver This is an alias for "res.ver".
"1.1". This can be useful for logs, but is mostly there for ACL.
sc1_bytes_in_rate sc1_bytes_in_rate
sc2_bytes_in_rate sc2_bytes_in_rate
@ -9977,21 +10057,13 @@ The list of currently supported pattern fetch functions is the following :
a given address for example. a given address for example.
scook([<name>]) scook([<name>])
This extracts the last occurrence of the cookie name <name> on a This is an alias for "res.cook".
"Set-Cookie" header line from the response, and returns its
value as string. If no name is specified, the first cookie value
is returned.
scook_cnt([<name>]) scook_cnt([<name>])
Returns an integer value representing the number of occurrences of This is an alias for "res.cook_cnt".
the cookie <name> in the response, or all cookies if <name> is not
specified.
scook_val([<name>]) scook_val([<name>])
This extracts the last occurrence of the cookie name <name> on a This is an alias for "res.cook_val".
"Set-Cookie" header line from the response, and converts its
value to an integer which is returned. If no name is specified,
the first cookie value is returned.
set-cookie(<name>) set-cookie(<name>)
This fetch function is deprecated and has been superseded by the This fetch function is deprecated and has been superseded by the
@ -10007,37 +10079,16 @@ The list of currently supported pattern fetch functions is the following :
See also : "appsession" See also : "appsession"
shdr(<name>[,<occ>]) shdr(<name>[,<occ>])
This extracts the last occurrence of header <name> in an HTTP This is an alias for "res.hdr".
response. Optionally, a specific occurrence might be specified
as a position number. Positive values indicate a position from
the first occurrence, with 1 being the first one. Negative
values indicate positions relative to the last one, with -1
being the last one. This can be useful to learn some data into
a stick-table.
shdr_cnt([<name>]) shdr_cnt([<name>])
Returns an integer value representing the number of occurrences This is an alias for "res.hdr_cnt".
of response header field name <name>, or the total number of
header fields if <name> is not specified.
shdr_ip([<name>[,<occ>]]) shdr_ip([<name>[,<occ>]])
This extracts the last occurrence of header <name> in an HTTP This is an alias for "res.hdr_ip".
response, convert it to an IPv4 or IPv6 address and returns this
address. Optionally, a specific occurrence might be specified as
a position number. Positive values indicate a position from the
first occurrence, with 1 being the first one. Negative values
indicate positions relative to the last one, with -1 being the
last one. This can be useful to learn some data into a stick
table.
shdr_val([<name>[,<occ>]]) shdr_val([<name>[,<occ>]])
This extracts the last occurrence of header <name> in an HTTP This is an alias for "res.hdr_val".
response, and converts it to an integer value. Optionally, a
specific occurrence might be specified as a position number.
Positive values indicate a position from the first occurrence,
with 1 being the first one. Negative values indicate positions
relative to the last one, with -1 being the last one. This can
be useful to learn some data into a stick table.
so_id Returns an integer containing the listening socket's id. so_id Returns an integer containing the listening socket's id.

View File

@ -9531,28 +9531,28 @@ static struct acl_kw_list acl_kws = {{ },{
{ "base_reg", "base", acl_parse_reg, acl_match_reg, ACL_USE_L7REQ_VOLATILE }, { "base_reg", "base", acl_parse_reg, acl_match_reg, ACL_USE_L7REQ_VOLATILE },
{ "base_sub", "base", acl_parse_str, acl_match_sub, ACL_USE_L7REQ_VOLATILE }, { "base_sub", "base", acl_parse_str, acl_match_sub, ACL_USE_L7REQ_VOLATILE },
{ "cook", "cook", acl_parse_str, acl_match_str, ACL_USE_L7REQ_VOLATILE }, { "cook", "req.cook", acl_parse_str, acl_match_str, ACL_USE_L7REQ_VOLATILE },
{ "cook_beg", "cook", acl_parse_str, acl_match_beg, ACL_USE_L7REQ_VOLATILE }, { "cook_beg", "req.cook", acl_parse_str, acl_match_beg, ACL_USE_L7REQ_VOLATILE },
{ "cook_cnt", "cook_cnt", acl_parse_int, acl_match_int, ACL_USE_L7REQ_VOLATILE }, { "cook_cnt", "req.cook_cnt", acl_parse_int, acl_match_int, ACL_USE_L7REQ_VOLATILE },
{ "cook_dir", "cook", acl_parse_str, acl_match_dir, ACL_USE_L7REQ_VOLATILE }, { "cook_dir", "req.cook", acl_parse_str, acl_match_dir, ACL_USE_L7REQ_VOLATILE },
{ "cook_dom", "cook", acl_parse_str, acl_match_dom, ACL_USE_L7REQ_VOLATILE }, { "cook_dom", "req.cook", acl_parse_str, acl_match_dom, ACL_USE_L7REQ_VOLATILE },
{ "cook_end", "cook", acl_parse_str, acl_match_end, ACL_USE_L7REQ_VOLATILE }, { "cook_end", "req.cook", acl_parse_str, acl_match_end, ACL_USE_L7REQ_VOLATILE },
{ "cook_len", "cook", acl_parse_int, acl_match_len, ACL_USE_L7REQ_VOLATILE }, { "cook_len", "req.cook", acl_parse_int, acl_match_len, ACL_USE_L7REQ_VOLATILE },
{ "cook_reg", "cook", acl_parse_reg, acl_match_reg, ACL_USE_L7REQ_VOLATILE }, { "cook_reg", "req.cook", acl_parse_reg, acl_match_reg, ACL_USE_L7REQ_VOLATILE },
{ "cook_sub", "cook", acl_parse_str, acl_match_sub, ACL_USE_L7REQ_VOLATILE }, { "cook_sub", "req.cook", acl_parse_str, acl_match_sub, ACL_USE_L7REQ_VOLATILE },
{ "cook_val", "cook_val", acl_parse_int, acl_match_int, ACL_USE_L7REQ_VOLATILE }, { "cook_val", "req.cook_val", acl_parse_int, acl_match_int, ACL_USE_L7REQ_VOLATILE },
{ "hdr", "hdr", acl_parse_str, acl_match_str, ACL_USE_L7REQ_VOLATILE }, { "hdr", "req.hdr", acl_parse_str, acl_match_str, ACL_USE_L7REQ_VOLATILE },
{ "hdr_beg", "hdr", acl_parse_str, acl_match_beg, ACL_USE_L7REQ_VOLATILE }, { "hdr_beg", "req.hdr", acl_parse_str, acl_match_beg, ACL_USE_L7REQ_VOLATILE },
{ "hdr_cnt", "hdr_cnt", acl_parse_int, acl_match_int, ACL_USE_L7REQ_VOLATILE }, { "hdr_cnt", "req.hdr_cnt", acl_parse_int, acl_match_int, ACL_USE_L7REQ_VOLATILE },
{ "hdr_dir", "hdr", acl_parse_str, acl_match_dir, ACL_USE_L7REQ_VOLATILE }, { "hdr_dir", "req.hdr", acl_parse_str, acl_match_dir, ACL_USE_L7REQ_VOLATILE },
{ "hdr_dom", "hdr", acl_parse_str, acl_match_dom, ACL_USE_L7REQ_VOLATILE }, { "hdr_dom", "req.hdr", acl_parse_str, acl_match_dom, ACL_USE_L7REQ_VOLATILE },
{ "hdr_end", "hdr", acl_parse_str, acl_match_end, ACL_USE_L7REQ_VOLATILE }, { "hdr_end", "req.hdr", acl_parse_str, acl_match_end, ACL_USE_L7REQ_VOLATILE },
{ "hdr_ip", "hdr_ip", acl_parse_ip, acl_match_ip, ACL_USE_L7REQ_VOLATILE }, { "hdr_ip", "req.hdr_ip", acl_parse_ip, acl_match_ip, ACL_USE_L7REQ_VOLATILE },
{ "hdr_len", "hdr", acl_parse_int, acl_match_len, ACL_USE_L7REQ_VOLATILE }, { "hdr_len", "req.hdr", acl_parse_int, acl_match_len, ACL_USE_L7REQ_VOLATILE },
{ "hdr_reg", "hdr", acl_parse_reg, acl_match_reg, ACL_USE_L7REQ_VOLATILE }, { "hdr_reg", "req.hdr", acl_parse_reg, acl_match_reg, ACL_USE_L7REQ_VOLATILE },
{ "hdr_sub", "hdr", acl_parse_str, acl_match_sub, ACL_USE_L7REQ_VOLATILE }, { "hdr_sub", "req.hdr", acl_parse_str, acl_match_sub, ACL_USE_L7REQ_VOLATILE },
{ "hdr_val", "hdr_val", acl_parse_int, acl_match_int, ACL_USE_L7REQ_VOLATILE }, { "hdr_val", "req.hdr_val", acl_parse_int, acl_match_int, ACL_USE_L7REQ_VOLATILE },
{ "http_auth", NULL, acl_parse_nothing, acl_match_nothing, ACL_USE_L7REQ_VOLATILE }, { "http_auth", NULL, acl_parse_nothing, acl_match_nothing, ACL_USE_L7REQ_VOLATILE },
{ "http_auth_group", NULL, acl_parse_strcat, acl_match_auth, ACL_USE_L7REQ_VOLATILE }, { "http_auth_group", NULL, acl_parse_strcat, acl_match_auth, ACL_USE_L7REQ_VOLATILE },
@ -9570,32 +9570,32 @@ static struct acl_kw_list acl_kws = {{ },{
{ "path_reg", "path", acl_parse_reg, acl_match_reg, ACL_USE_L7REQ_VOLATILE }, { "path_reg", "path", acl_parse_reg, acl_match_reg, ACL_USE_L7REQ_VOLATILE },
{ "path_sub", "path", acl_parse_str, acl_match_sub, ACL_USE_L7REQ_VOLATILE }, { "path_sub", "path", acl_parse_str, acl_match_sub, ACL_USE_L7REQ_VOLATILE },
{ "req_proto_http", NULL, acl_parse_nothing, acl_match_nothing, ACL_USE_L7REQ_PERMANENT }, { "req_proto_http", "req.proto_http",acl_parse_nothing, acl_match_nothing, ACL_USE_L7REQ_PERMANENT },
{ "req_ver", NULL, acl_parse_ver, acl_match_str, ACL_USE_L7REQ_VOLATILE }, { "req_ver", "req.ver", acl_parse_ver, acl_match_str, ACL_USE_L7REQ_VOLATILE },
{ "resp_ver", NULL, acl_parse_ver, acl_match_str, ACL_USE_L7RTR_VOLATILE }, { "resp_ver", "res.ver", acl_parse_ver, acl_match_str, ACL_USE_L7RTR_VOLATILE },
{ "scook", "scook", acl_parse_str, acl_match_str, ACL_USE_L7RTR_VOLATILE }, { "scook", "res.cook", acl_parse_str, acl_match_str, ACL_USE_L7RTR_VOLATILE },
{ "scook_beg", "scook", acl_parse_str, acl_match_beg, ACL_USE_L7RTR_VOLATILE }, { "scook_beg", "res.cook", acl_parse_str, acl_match_beg, ACL_USE_L7RTR_VOLATILE },
{ "scook_cnt", "scook_cnt", acl_parse_int, acl_match_int, ACL_USE_L7RTR_VOLATILE }, { "scook_cnt", "res.cook_cnt", acl_parse_int, acl_match_int, ACL_USE_L7RTR_VOLATILE },
{ "scook_dir", "scook", acl_parse_str, acl_match_dir, ACL_USE_L7RTR_VOLATILE }, { "scook_dir", "res.cook", acl_parse_str, acl_match_dir, ACL_USE_L7RTR_VOLATILE },
{ "scook_dom", "scook", acl_parse_str, acl_match_dom, ACL_USE_L7RTR_VOLATILE }, { "scook_dom", "res.cook", acl_parse_str, acl_match_dom, ACL_USE_L7RTR_VOLATILE },
{ "scook_end", "scook", acl_parse_str, acl_match_end, ACL_USE_L7RTR_VOLATILE }, { "scook_end", "res.cook", acl_parse_str, acl_match_end, ACL_USE_L7RTR_VOLATILE },
{ "scook_len", "scook", acl_parse_int, acl_match_len, ACL_USE_L7RTR_VOLATILE }, { "scook_len", "res.cook", acl_parse_int, acl_match_len, ACL_USE_L7RTR_VOLATILE },
{ "scook_reg", "scook", acl_parse_reg, acl_match_reg, ACL_USE_L7RTR_VOLATILE }, { "scook_reg", "res.cook", acl_parse_reg, acl_match_reg, ACL_USE_L7RTR_VOLATILE },
{ "scook_sub", "scook", acl_parse_str, acl_match_sub, ACL_USE_L7RTR_VOLATILE }, { "scook_sub", "res.cook", acl_parse_str, acl_match_sub, ACL_USE_L7RTR_VOLATILE },
{ "scook_val", "scook_val", acl_parse_int, acl_match_int, ACL_USE_L7RTR_VOLATILE }, { "scook_val", "res.cook_val", acl_parse_int, acl_match_int, ACL_USE_L7RTR_VOLATILE },
{ "shdr", "shdr", acl_parse_str, acl_match_str, ACL_USE_L7RTR_VOLATILE }, { "shdr", "res.hdr", acl_parse_str, acl_match_str, ACL_USE_L7RTR_VOLATILE },
{ "shdr_beg", "shdr", acl_parse_str, acl_match_beg, ACL_USE_L7RTR_VOLATILE }, { "shdr_beg", "res.hdr", acl_parse_str, acl_match_beg, ACL_USE_L7RTR_VOLATILE },
{ "shdr_cnt", "shdr_cnt", acl_parse_int, acl_match_int, ACL_USE_L7RTR_VOLATILE }, { "shdr_cnt", "res.hdr_cnt", acl_parse_int, acl_match_int, ACL_USE_L7RTR_VOLATILE },
{ "shdr_dir", "shdr", acl_parse_str, acl_match_dir, ACL_USE_L7RTR_VOLATILE }, { "shdr_dir", "res.hdr", acl_parse_str, acl_match_dir, ACL_USE_L7RTR_VOLATILE },
{ "shdr_dom", "shdr", acl_parse_str, acl_match_dom, ACL_USE_L7RTR_VOLATILE }, { "shdr_dom", "res.hdr", acl_parse_str, acl_match_dom, ACL_USE_L7RTR_VOLATILE },
{ "shdr_end", "shdr", acl_parse_str, acl_match_end, ACL_USE_L7RTR_VOLATILE }, { "shdr_end", "res.hdr", acl_parse_str, acl_match_end, ACL_USE_L7RTR_VOLATILE },
{ "shdr_ip", "shdr_ip", acl_parse_ip, acl_match_ip, ACL_USE_L7RTR_VOLATILE }, { "shdr_ip", "res.hdr_ip", acl_parse_ip, acl_match_ip, ACL_USE_L7RTR_VOLATILE },
{ "shdr_len", "shdr", acl_parse_int, acl_match_len, ACL_USE_L7RTR_VOLATILE }, { "shdr_len", "res.hdr", acl_parse_int, acl_match_len, ACL_USE_L7RTR_VOLATILE },
{ "shdr_reg", "shdr", acl_parse_reg, acl_match_reg, ACL_USE_L7RTR_VOLATILE }, { "shdr_reg", "res.hdr", acl_parse_reg, acl_match_reg, ACL_USE_L7RTR_VOLATILE },
{ "shdr_sub", "shdr", acl_parse_str, acl_match_sub, ACL_USE_L7RTR_VOLATILE }, { "shdr_sub", "res.hdr", acl_parse_str, acl_match_sub, ACL_USE_L7RTR_VOLATILE },
{ "shdr_val", "shdr_val", acl_parse_int, acl_match_int, ACL_USE_L7RTR_VOLATILE }, { "shdr_val", "res.hdr_val", acl_parse_int, acl_match_int, ACL_USE_L7RTR_VOLATILE },
{ "status", NULL, acl_parse_int, acl_match_int, ACL_USE_L7RTR_PERMANENT }, { "status", NULL, acl_parse_int, acl_match_int, ACL_USE_L7RTR_PERMANENT },
@ -9656,10 +9656,39 @@ static struct sample_fetch_kw_list sample_fetch_keywords = {{ },{
{ "http_first_req", smp_fetch_http_first_req, 0, NULL, SMP_T_BOOL, SMP_USE_HRQHP }, { "http_first_req", smp_fetch_http_first_req, 0, NULL, SMP_T_BOOL, SMP_USE_HRQHP },
{ "method", smp_fetch_meth, 0, NULL, SMP_T_UINT, SMP_USE_HRQHP }, { "method", smp_fetch_meth, 0, NULL, SMP_T_UINT, SMP_USE_HRQHP },
{ "path", smp_fetch_path, 0, NULL, SMP_T_CSTR, SMP_USE_HRQHV }, { "path", smp_fetch_path, 0, NULL, SMP_T_CSTR, SMP_USE_HRQHV },
/* HTTP protocol on the request path */
{ "req.proto_http", smp_fetch_proto_http, 0, NULL, SMP_T_BOOL, SMP_USE_HRQHP },
{ "req_proto_http", smp_fetch_proto_http, 0, NULL, SMP_T_BOOL, SMP_USE_HRQHP }, { "req_proto_http", smp_fetch_proto_http, 0, NULL, SMP_T_BOOL, SMP_USE_HRQHP },
/* HTTP version on the request path */
{ "req.ver", smp_fetch_rqver, 0, NULL, SMP_T_CSTR, SMP_USE_HRQHV },
{ "req_ver", smp_fetch_rqver, 0, NULL, SMP_T_CSTR, SMP_USE_HRQHV }, { "req_ver", smp_fetch_rqver, 0, NULL, SMP_T_CSTR, SMP_USE_HRQHV },
/* HTTP version on the response path */
{ "res.ver", smp_fetch_stver, 0, NULL, SMP_T_CSTR, SMP_USE_HRSHV },
{ "resp_ver", smp_fetch_stver, 0, NULL, SMP_T_CSTR, SMP_USE_HRSHV }, { "resp_ver", smp_fetch_stver, 0, NULL, SMP_T_CSTR, SMP_USE_HRSHV },
/* explicit req.{cook,hdr} are used to force the fetch direction to be request-only */
{ "req.cook", smp_fetch_cookie, ARG1(0,STR), NULL, SMP_T_CSTR, SMP_USE_HRQHV },
{ "req.cook_cnt", smp_fetch_cookie_cnt, ARG1(0,STR), NULL, SMP_T_UINT, SMP_USE_HRQHV },
{ "req.cook_val", smp_fetch_cookie_val, ARG1(0,STR), NULL, SMP_T_UINT, SMP_USE_HRQHV },
{ "req.hdr", smp_fetch_hdr, ARG2(0,STR,SINT), val_hdr, SMP_T_CSTR, SMP_USE_HRQHV },
{ "req.hdr_cnt", smp_fetch_hdr_cnt, ARG1(0,STR), NULL, SMP_T_UINT, SMP_USE_HRQHV },
{ "req.hdr_ip", smp_fetch_hdr_ip, ARG2(0,STR,SINT), val_hdr, SMP_T_IPV4, SMP_USE_HRQHV },
{ "req.hdr_val", smp_fetch_hdr_val, ARG2(0,STR,SINT), val_hdr, SMP_T_UINT, SMP_USE_HRQHV },
/* explicit req.{cook,hdr} are used to force the fetch direction to be response-only */
{ "res.cook", smp_fetch_cookie, ARG1(0,STR), NULL, SMP_T_CSTR, SMP_USE_HRSHV },
{ "res.cook_cnt", smp_fetch_cookie_cnt, ARG1(0,STR), NULL, SMP_T_UINT, SMP_USE_HRSHV },
{ "res.cook_val", smp_fetch_cookie_val, ARG1(0,STR), NULL, SMP_T_UINT, SMP_USE_HRSHV },
{ "res.hdr", smp_fetch_hdr, ARG2(0,STR,SINT), val_hdr, SMP_T_CSTR, SMP_USE_HRSHV },
{ "res.hdr_cnt", smp_fetch_hdr_cnt, ARG1(0,STR), NULL, SMP_T_UINT, SMP_USE_HRSHV },
{ "res.hdr_ip", smp_fetch_hdr_ip, ARG2(0,STR,SINT), val_hdr, SMP_T_IPV4, SMP_USE_HRSHV },
{ "res.hdr_val", smp_fetch_hdr_val, ARG2(0,STR,SINT), val_hdr, SMP_T_UINT, SMP_USE_HRSHV },
/* scook is valid only on the response and is used for ACL compatibility */ /* scook is valid only on the response and is used for ACL compatibility */
{ "scook", smp_fetch_cookie, ARG1(0,STR), NULL, SMP_T_CSTR, SMP_USE_HRSHV }, { "scook", smp_fetch_cookie, ARG1(0,STR), NULL, SMP_T_CSTR, SMP_USE_HRSHV },
{ "scook_cnt", smp_fetch_cookie_cnt, ARG1(0,STR), NULL, SMP_T_UINT, SMP_USE_HRSHV }, { "scook_cnt", smp_fetch_cookie_cnt, ARG1(0,STR), NULL, SMP_T_UINT, SMP_USE_HRSHV },