]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: httpclient: don't consume data before it was analyzed
authorWilliam Lallemand <wlallemand@haproxy.org>
Thu, 24 Feb 2022 15:55:41 +0000 (16:55 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 14 Mar 2022 14:10:12 +0000 (15:10 +0100)
commit2b7dc4edb054ae6496ee72b502674a073b9cf2cd
tree8f6fd34559ce73cd296d9a007dba031b0ca8f188
parentbc8b7a14ff2674f83ca04d341390e8cb32ed5fd2
BUG/MEDIUM: httpclient: don't consume data before it was analyzed

In httpclient_applet_io_handler(), on the response path, we don't check
if the data are in the output part of the channel, and could consume
them before they were analyzed.

To fix this issue, this patch checks for the stline and the headers if
the msg_state is >= HTTP_MSG_DATA which means the stline and headers
were analyzed. For the data part, it checks if each htx blocks is in the
output before copying it.

Must be backported in 2.5.
src/http_client.c