]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTEST: Fix format of set-uri HTTP request rule in h1or2_to_h1c.vtc
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 17 Jan 2020 22:21:59 +0000 (23:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 20 Jan 2020 14:18:45 +0000 (15:18 +0100)
First, concat() is a converter, not a sample fetch. So use str() sample fetch
with no string and call concat on it. Then, the argument of the set-uri rule
must be a log format string. So it must be inside %[] to be evaluated.

reg-tests/http-rules/h1or2_to_h1c.vtc

index 0ed0984d8b37c8d095ed9c1f0d5b7f8f86163a5c..3fbc3f747142aa70a2d4bb259c8c82dd7b882cb6 100644 (file)
@@ -57,7 +57,7 @@ haproxy h1 -conf {
        http-request set-header     sl1      "sl1: "
 
        http-request set-method              "%[str(GET)]"
-       http-request set-uri                 concat(/bu/,req.uri,/eu)
+       http-request set-uri                 %[str(),concat(/bu/,req.uri,/eu)]
        http-request set-path                "/bp/%[var(req.path)]/ep"
        http-request set-query               "bq&%[var(req.query)]&eq"
 
@@ -124,7 +124,7 @@ haproxy h1 -conf {
        http-request set-header     sl1      "sl1: "
 
        http-request set-method              "%[str(GET)]"
-       http-request set-uri                 concat(/bu/,req.uri,/eu)
+       http-request set-uri                 %[str(),concat(/bu/,req.uri,/eu)]
        http-request set-path                "/bp/%[var(req.path)]/ep"
        http-request set-query               "bq&%[var(req.query)]&eq"