]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: http-htx: Report the payload of RAW_DATA blocks in internal.htx_blk.data
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 11:21:39 +0000 (13:21 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 15:05:19 +0000 (17:05 +0200)
The "internal.htx_blk.data" sample fetch only reported the payload of DATA
blocks. Because tunneled data are now stored in RAW_DATA blocks, and because
"internal.htx_blk.type" reports this new type, an empty string was returned
for such block while its type was properly displayed.

These sample fetches are debugging helpers. So both types are now handled,
htx_is_data_type() being used to test it.

src/http_htx.c

index c22545a11618ea26cb00aced025d083ca6f06174..4e887e2810e88021ccd4caafb79ca2f847f8482a 100644 (file)
@@ -3099,7 +3099,7 @@ smp_fetch_htx_blk_data(const struct arg *arg_p, struct sample *smp, const char *
        else
                blk = ((pos >= htx->head && pos <= htx->tail) ? htx_get_blk(htx, pos) : NULL);
 
-       if (!blk || htx_get_blk_type(blk) != HTX_BLK_DATA) {
+       if (!blk || !htx_is_data_type(htx_get_blk_type(blk))) {
                smp->data.u.str.size = 0;
                smp->data.u.str.area = "";
                smp->data.u.str.data = 0;