mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 06:41:32 +02:00
BUG/MINOR: sample: fix case sensitivity for the regsub converter
Two commits ago in 7eda849 ("MEDIUM: samples: add a regsub converter to perform regex-based transformations"), I got caught for the second time with the inverted case sensitivity usage of regex_comp(). So by default it is case insensitive and passing the "i" flag makes it case sensitive. I forgot to recheck that case before committing the cleanup. No harm anyway, nobody had the time to use it.
This commit is contained in:
parent
0766e441dd
commit
d817e468bf
@ -1201,7 +1201,7 @@ int smp_resolve_args(struct proxy *p)
|
|||||||
rflags |= (arg->type_flags & ARGF_REG_ICASE) ? REG_ICASE : 0;
|
rflags |= (arg->type_flags & ARGF_REG_ICASE) ? REG_ICASE : 0;
|
||||||
err = NULL;
|
err = NULL;
|
||||||
|
|
||||||
if (!regex_comp(arg->data.str.str, reg, rflags, 1 /* capture substr */, &err)) {
|
if (!regex_comp(arg->data.str.str, reg, !(rflags & REG_ICASE), 1 /* capture substr */, &err)) {
|
||||||
Alert("parsing [%s:%d] : error in regex '%s' in arg %d of %s%s%s%s '%s' %s proxy '%s' : %s.\n",
|
Alert("parsing [%s:%d] : error in regex '%s' in arg %d of %s%s%s%s '%s' %s proxy '%s' : %s.\n",
|
||||||
cur->file, cur->line,
|
cur->file, cur->line,
|
||||||
arg->data.str.str,
|
arg->data.str.str,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user