BUG/MEDIUM: stream: Use the front analyzers for new listener-less streams
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 7 Mar 2022 14:31:46 +0000 (15:31 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 10 Mar 2022 09:51:21 +0000 (10:51 +0100)
commit520cfeaf03765d2497dce292251fd29d82c7aeff
treecc2e06a764456077a82c59d6bab79d9ba5ac46e8
parent87d74d5655e02a0d845ed06e55e0d21f24d54096
BUG/MEDIUM: stream: Use the front analyzers for new listener-less streams

For now, for a stream, request analyzers are set at 2 stages. The first one
is when the stream is created. The session's listener analyzers, if any, are
set on the request channel. In addition, some HTTP analyzers are set for HTX
streams (AN_REQ_WAIT_HTTP and AN_REQ_HTTP_PROCESS_FE). The second one is
when the backend is set on the stream. At the stage, request analyzers are
updated using the backend settings.

It is an issue for client applets because there is no listener attached to
the stream. In addtion, it may have no specific/dedicated backend. Thus,
several request analyzers are missing. Among others, the HTTP analyzers for
HTTP applets. The HTTP client is the only one affected for now.

To fix the bug, when a stream is created without a listener, we use the
frontend to set the request analyzers. Note that there is no issue with the
response channel because its analyzers are set when the server connection is
established.

This patch may be backported to all stable versions. Because only the HTTP
client is affected, it must at least be backported to 2.5. It is related to
the issue #1593.

(cherry picked from commit e9382e0afe263c06fe4e7b1839e2c482b89ed42c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/stream.c