mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-11 09:02:52 +02:00
Baptiste Assmann reported a bug causing a crash on recent versions when sticking rules were set on layer 7 in a TCP proxy. The bug is easier to reproduce with the "defer-accept" option on the "bind" line in order to have some contents to parse when the connection is accepted. The issue is that the acl_prefetch_http() function called from HTTP fetches relies on hdr_idx to be preinitialized, which is not the case if there is no L7 ACL. The solution consists in adding a new SMP_CAP_L7 flag to fetches to indicate that they are expected to work on L7 data, so that the proxy knows that the hdr_idx has to be initialized. This is already how ACL and HTTP mode are handled. The bug was present since 1.5-dev9.