From a9e639afe2e5bc5aae9ee5e9d056600aaaf0b6e3 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 6 May 2021 15:50:12 +0200 Subject: [PATCH] MINOR: http_act: mark normalize-uri as experimental normalize-uri http rule is marked as experimental, so it cannot be activated without the global 'expose-experimental-directives'. The associated vtc is updated to be able to use it. --- doc/configuration.txt | 7 ++++--- reg-tests/http-rules/normalize_uri.vtc | 3 +++ src/http_act.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 19f180884f..f33c97552c 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -6174,9 +6174,10 @@ http-request normalize-uri query-sort-by-name [ { if | unless } ] Performs normalization of the request's URI. URI normalization in HAProxy 2.4 is currently available as an experimental - technical preview. You should be prepared that the behavior of normalizers - might change to fix possible issues, possibly breaking proper request - processing in your infrastructure. + technical preview. As such, it requires the global directive + 'expose-experimental-directives' first to be able to invoke it. You should be + prepared that the behavior of normalizers might change to fix possible + issues, possibly breaking proper request processing in your infrastructure. Each normalizer handles a single type of normalization to allow for a fine-grained selection of the level of normalization that is appropriate for diff --git a/reg-tests/http-rules/normalize_uri.vtc b/reg-tests/http-rules/normalize_uri.vtc index cc88060667..47032d96c0 100644 --- a/reg-tests/http-rules/normalize_uri.vtc +++ b/reg-tests/http-rules/normalize_uri.vtc @@ -11,6 +11,9 @@ server s1 { } -repeat 63 -start haproxy h1 -conf { + global + expose-experimental-directives + defaults mode http timeout connect 1s diff --git a/src/http_act.c b/src/http_act.c index 2fe235e48d..b8413f3318 100644 --- a/src/http_act.c +++ b/src/http_act.c @@ -2449,7 +2449,7 @@ static struct action_kw_list http_req_actions = { { "deny", parse_http_deny, 0 }, { "disable-l7-retry", parse_http_req_disable_l7_retry, 0 }, { "early-hint", parse_http_set_header, 0 }, - { "normalize-uri", parse_http_normalize_uri, 0 }, + { "normalize-uri", parse_http_normalize_uri, KWF_EXPERIMENTAL }, { "redirect", parse_http_redirect, 0 }, { "reject", parse_http_action_reject, 0 }, { "replace-header", parse_http_replace_header, 0 }, -- 2.47.2