]> git.kaiwu.me - haproxy.git/commit
REGTESTS: http-rules: test replace-uri and the header replacement actions
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Sep 2026 20:35:35 +0000 (20:35 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:55:57 +0000 (16:55 +0200)
commitc0d0464cc1ffff55c25487bb5651c71058a7a6f9
tree8f0e502b9dc3d111483bb07f8e8a9f468f31c046
parent4c3e22e485c3ab147d4a6ff8fa30942f51ef8ebd
REGTESTS: http-rules: test replace-uri and the header replacement actions

replace-uri had no coverage at all, and replace-header and replace-value
were only used by a test checking their size limits, not their
semantics.

The test rewrites a request target in the origin form and in the
absolute form to show that replace-uri also sees the scheme and the
authority, rewrites the scheme of an absolute URI, checks that a non
matching regex leaves the target untouched, and compares the result with
replace-path and replace-pathq on the same target.

It also checks that replace-header replaces the whole header line while
replace-value only replaces the matching comma-delimited element, and
that back-references work in the replacement format.
reg-tests/http-rules/replace_uri.vtc [new file with mode: 0644]