]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stats/htx: Call channel_add_input() when response headers are sent
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Feb 2019 15:28:48 +0000 (16:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Mar 2019 13:33:38 +0000 (14:33 +0100)
This function will only increment the total amount of bytes read by a channel
because at this stage there is no fast forwarding. So the bug is pretty limited.

This patch must be backported to 1.9.

src/stats.c

index 26b1450e8a497d10c6ce5a29156423d0603b05b8..b3935410f7f3b8cae0eb61cefb47a051b9788716 100644 (file)
@@ -3136,6 +3136,7 @@ static int stats_send_htx_headers(struct stream_interface *si, struct htx *htx)
        if (!htx_add_endof(htx, HTX_BLK_EOH))
                goto full;
 
+       channel_add_input(&s->res, htx->data);
        return 1;
 
   full:
@@ -3195,6 +3196,7 @@ static int stats_send_htx_redirect(struct stream_interface *si, struct htx *htx)
        if (!htx_add_endof(htx, HTX_BLK_EOH))
                goto full;
 
+       channel_add_input(&s->res, htx->data);
        return 1;
 
 full: