1
0
mirror of http://git.haproxy.org/git/haproxy.git/ synced 2025-03-08 20:39:55 +00:00

BUG/MINOR: http-check: Use right condition to consider HTX message as full

When an HTTP expect rule is evaluated, we must know if more data is expected
or not to wait if the matching fails. If the whole response is received or
if the HTX message is full, we must not wait. In this context,
htx_free_data_space() must be used instead of htx_free_space(). The fisrt
one count down the block size. Otherwise at the edge, when only the block
size remains free (8 bytes), we may think there is some place for more data
while the mux is unable to add more block.

This bug explains the loop described on the GH issue . It should be
backported as far as 2.2.
This commit is contained in:
Christopher Faulet 2020-12-09 19:45:07 +01:00
parent 343d0356a5
commit 3f527197cd

View File

@ -1511,7 +1511,7 @@ enum tcpcheck_eval_ret tcpcheck_eval_expect_http(struct check *check, struct tcp
struct ist desc = IST_NULL;
int i, match, inverse;
last_read |= (!htx_free_space(htx) || (htx_get_tail_type(htx) == HTX_BLK_EOM));
last_read |= (!htx_free_data_space(htx) || (htx_get_tail_type(htx) == HTX_BLK_EOM));
if (htx->flags & HTX_FL_PARSING_ERROR) {
status = HCHK_STATUS_L7RSP;