]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: proto-htx: Use channel_htx_fwd_all() when unfiltered body are forwarded
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 May 2019 09:53:17 +0000 (11:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 05:42:33 +0000 (07:42 +0200)
So the first block position of the HTX message will always be updated
accordingly.

src/proto_htx.c

index 7cc26ba3105d71a62b5313e47bfe22764ba842a3..f596294d9c82128a101b4b78c4e09347ae828147 100644 (file)
@@ -1225,7 +1225,7 @@ int htx_request_forward_body(struct stream *s, struct channel *req, int an_bit)
                        goto missing_data_or_waiting;
        }
        else {
-               c_adv(req, htx->data - co_data(req));
+               channel_htx_fwd_all(req, htx);
                if (msg->flags & HTTP_MSGF_XFER_LEN)
                        channel_htx_forward_forever(req, htx);
        }
@@ -2222,7 +2222,7 @@ int htx_response_forward_body(struct stream *s, struct channel *res, int an_bit)
                        goto missing_data_or_waiting;
        }
        else {
-               c_adv(res, htx->data - co_data(res));
+               channel_htx_fwd_all(res, htx);
                if (msg->flags & HTTP_MSGF_XFER_LEN)
                        channel_htx_forward_forever(res, htx);
        }