]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: http-ana: Do a defrag on unaligned HTX message when waiting for payload
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 10 Feb 2026 17:33:02 +0000 (18:33 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 Feb 2026 12:26:21 +0000 (13:26 +0100)
When we are waiting for the request or response payload, it is usually
because the payload will be analyzed in a way or another. So, perform a
defrag if necessary. This should ease payload analyzis.

src/http_ana.c

index 0f52ba3f1dee1644d3fece924d6fb92193ad67d0..4f6df2ea4e544d0b4cb3df5977ec42ea3644fa48 100644 (file)
@@ -4326,6 +4326,9 @@ enum rule_result http_wait_for_msg_body(struct stream *s, struct channel *chn,
   end:
        if (ret != HTTP_RULE_RES_YIELD)
                chn->analyse_exp = TICK_ETERNITY;
+
+       if (htx->flags & (HTX_FL_FRAGMENTED|HTX_FL_UNORDERED))
+               htx_defrag(htx, NULL, 0);
        return ret;
 
   abort: