]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: httpclient: only check co_data() instead of HTTP_MSG_DATA
authorWilliam Lallemand <wlallemand@haproxy.org>
Thu, 17 Mar 2022 13:45:46 +0000 (14:45 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 18 Mar 2022 10:34:10 +0000 (11:34 +0100)
commita625b03e834704c5683e6a3abd09f9163ac8adc6
tree4ed9a858ac0e6ba13384eaea0b55befcbe7b6d1e
parentdd7e6c6dc7d65c8fb0c77bfbf4d12b01b792295c
BUG/MINOR: httpclient: only check co_data() instead of HTTP_MSG_DATA

Checking msg >= HTTP_MSG_DATA was useful to check if we received all the
data. However it does not work correctly in case of errors because we
don't reach this state, preventing to catch the error in the httpclient.

The consequence of this problem is that we don't get the status code of
the error response upon an error.

Fix the issue by only checking co_data().

Must be backported to 2.5.
src/http_client.c