From: Christopher Faulet Date: Wed, 1 Jul 2026 13:33:22 +0000 (+0200) Subject: CLEANUP: applet/http-client: Don't needlessly copy HTX flags after htx_xfer() X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/%7B@url%7D?a=commitdiff_plain;h=9aa081b17e582585881023ae19e5b410c4337db9;p=haproxy.git CLEANUP: applet/http-client: Don't needlessly copy HTX flags after htx_xfer() htx_xfer() function already takes care to copy HTX flags (EOM and errors). So it is useless to do so in caller functions. --- diff --git a/src/applet.c b/src/applet.c index db30df612..a6e6a4e78 100644 --- a/src/applet.c +++ b/src/applet.c @@ -512,10 +512,6 @@ size_t appctx_htx_rcv_buf(struct appctx *appctx, struct buffer *buf, size_t coun } htx_xfer(buf_htx, appctx_htx, count, HTX_XFER_DEFAULT); - buf_htx->flags |= (appctx_htx->flags & (HTX_FL_PARSING_ERROR|HTX_FL_PROCESSING_ERROR)); - if (htx_is_empty(appctx_htx)) { - buf_htx->flags |= (appctx_htx->flags & HTX_FL_EOM); - } htx_to_buf(buf_htx, buf); htx_to_buf(appctx_htx, &appctx->outbuf); ret -= appctx_htx->data; @@ -607,10 +603,6 @@ size_t appctx_htx_snd_buf(struct appctx *appctx, struct buffer *buf, size_t coun } htx_xfer(appctx_htx, buf_htx, count, HTX_XFER_NO_METADATA); - if (htx_is_empty(buf_htx)) { - appctx_htx->flags |= (buf_htx->flags & HTX_FL_EOM); - } - htx_to_buf(appctx_htx, &appctx->inbuf); htx_to_buf(buf_htx, buf); ret -= buf_htx->data; diff --git a/src/http_client.c b/src/http_client.c index 157172242..3bdbb8080 100644 --- a/src/http_client.c +++ b/src/http_client.c @@ -621,11 +621,6 @@ void httpclient_applet_io_handler(struct appctx *appctx) applet_have_more_data(appctx); goto out; } - - /* we must copy the EOM if we empty the buffer */ - if (htx_is_empty(hc_htx)) { - htx->flags |= (hc_htx->flags & HTX_FL_EOM); - } htx_to_buf(htx, outbuf); htx_to_buf(hc_htx, &hc->req.buf); }