Hi, Here's couple of questions/suggestions for configuration.txt.
First I'm attaching a patch that corrects ]) order for urlp_val and adds 'Example:' string to src_clr_gpc0,src_inc_gpc0,sc2_clr_gpc0,sc2_inc_gpc0,ssl_c_sha1 (I assume that Example: is what generates the example formatting in html/dconv documentation). The html/dconv documentation doesn't seem to correctly parse some fetches/converters: 7.3.1 converters: set-var(<var name>) unset-var(<var name>) 7.3.2 ipv4(<ipv4>) ipv6(<ipv6>) I was thinking that it would nice to have a keyword matrix for fetches / converters (similar to what's already available for proxy keywords: https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4.1) Maybe this could as simple as table with keyword name and link(html/dconv) to more detailed descripton. Something like: converters: | add | and | base64 | | bool | bytes(<offset>[,<length>]) | cpl | ... layer 4 fetches: | be_id | dst | dst_conn | | dst_is_local | dst_port | fc_rtt(<unit>) | ... layer 5 fetches: ... This would make it faster/easier to scan what converters/fetches are available. Thoughts ? Some fetches are deprecated (for example cook), is the cook() ACL also deprecated ? Do these ACLs have same meaning ? cook / req.cook / req.cook -m str cook_beg / req.cook -m beg cook_dir / req.cook -m dir cook_dom / req.cook -m dom cook_end / req.cook -m end cook_len / req.cook -m len cook_req / req.cook -m reg cook_sub / req.cook -m sub If they do, then does it make sense to have both formats in configuration.txt ? (http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#7.3.6-req.cook) -Jarno -- Jarno Huuskonen
>From 2a7aea981d8ea482830317f6caf6b0fc93c90dbc Mon Sep 17 00:00:00 2001 From: Jarno Huuskonen <[email protected]> Date: Thu, 30 Mar 2017 09:19:45 +0300 Subject: [PATCH] DOC: urlp_val missing ), src_inc_gpc0/src_clr_gpc0 add Example: string. X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 --- doc/configuration.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 09aaf1d..795f5ed 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -13583,8 +13583,9 @@ src_clr_gpc0([<table>]) : integer designated stick-table, and returns its previous value. If the address is not found, an entry is created and 0 is returned. This is typically used as a second ACL in an expression in order to mark a connection when a first ACL - was verified : + was verified. + Example: # block if 5 consecutive requests continue to come faster than 10 sess # per second, and reset the counter as soon as the traffic slows down. acl abuse src_http_req_rate gt 10 @@ -13665,8 +13666,9 @@ src_inc_gpc0([<table>]) : integer designated stick-table, and returns its new value. If the address is not found, an entry is created and 1 is returned. See also sc0/sc2/sc2_inc_gpc0. This is typically used as a second ACL in an expression in order to mark a - connection when a first ACL was verified : + connection when a first ACL was verified. + Example: acl abuse src_http_req_rate gt 10 acl kill src_inc_gpc0 gt 0 tcp-request connection reject if abuse kill @@ -14833,7 +14835,7 @@ url_param([<name>[,<delim>]]) : string # match http://example.com/foo;JSESSIONID=some_id stick on urlp(JSESSIONID,;) -urlp_val([<name>[,<delim>])] : integer +urlp_val([<name>[,<delim>]]) : integer See "urlp" above. This one extracts the URL parameter <name> in the request and converts it to an integer value. This can be used for session stickiness based on a user ID for example, or with ACLs to match a page number or price. -- 1.8.3.1

