mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 22:31:06 +01:00
BUG/MEDIUM: http: fix inverted condition in pat_match_meth()
This results in a string-based HTTP method match returning true when it doesn't match and conversely. This bug was reported by Joe Williams. The fix must be backported to 1.5, though it still doesn't work because of at least 3-4 other bugs in the long path which leads to building this pattern list.
This commit is contained in:
parent
7346acb6f1
commit
4de2a94165
@ -9929,8 +9929,8 @@ static struct pattern *pat_match_meth(struct sample *smp, struct pattern_expr *e
|
||||
continue;
|
||||
|
||||
icase = expr->mflags & PAT_MF_IGNORE_CASE;
|
||||
if ((icase && strncasecmp(pattern->ptr.str, smp->data.meth.str.str, smp->data.meth.str.len) != 0) ||
|
||||
(!icase && strncmp(pattern->ptr.str, smp->data.meth.str.str, smp->data.meth.str.len) != 0))
|
||||
if ((icase && strncasecmp(pattern->ptr.str, smp->data.meth.str.str, smp->data.meth.str.len) == 0) ||
|
||||
(!icase && strncmp(pattern->ptr.str, smp->data.meth.str.str, smp->data.meth.str.len) == 0))
|
||||
return pattern;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user