]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: http-client: Fix the test on the response start-line
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Sep 2025 12:51:32 +0000 (14:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Sep 2025 12:59:28 +0000 (14:59 +0200)
commit331689d2167520ccd5c6098802db468fd9237e39
tree7f9ca1a21630643a7caee0ef8e83cdd238912f03
parent5c299dee5a1ce6a94ced534891be42345f3e81e5
BUG/MEDIUM: http-client: Fix the test on the response start-line

The commit 88aa7a780 ("MINOR: http-client: Trigger an error if first
response block isn't a start-line") introduced a bug. From an endpoint, an
applet or a mux, the <first> index must never be used. It is reserved to the
HTTP analyzers. From endpoint, this value may be undefined or just point on
any other block that the first one. Instead we must always get the head
block.

In taht case, to be sure the first HTX block in a response is a start-line,
we must use htx_get_head_type() function instead of htx_get_first_type().
Otherwise, we can trigger an error while the response is in fact properly
formatted.

It is a 3.3-speific issue. cNo backport needed.
src/http_client.c