]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: http: sample prefetch code was not properly migrated
authorWilly Tarreau <w@1wt.eu>
Sat, 6 Jul 2013 11:29:24 +0000 (13:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 6 Jul 2013 11:36:34 +0000 (13:36 +0200)
commit506d050600ffa767345766bdc19752284c971a9f
tree9890ab4a42887872426ca687ccf78012a7abb74c
parent5b15f9004d13b8a7e5e665929cad97a2c0beebd3
BUG/MAJOR: http: sample prefetch code was not properly migrated

When ACLs and samples were converged in 1.5-dev18, function
"acl_prefetch_http" was not properly converted after commit 8ed669b1.
It used to return -1 when contents did not match HTTP traffic, which
was considered as a "true" boolean result by the ACL execution code,
possibly causing crashes due to missing data when checking for HTTP
traffic in TCP rules.

Another issue is that when the function returned zero, it did not
set tje SMP_F_MAY_CHANGE flag, so it could randomly exit on partial
requests before waiting for a complete one.

Last issue is that when it returned 1, it did not set smp->data.uint,
so this last one would retain a random value from a past execution.
This could randomly cause some matches to fail as well.

Thanks to Remo Eichenberger for reporting this issue with a detailed
explanation and configuration.

This bug is 1.5-specific, no backport is needed.
src/proto_http.c