]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: httpclient: set HTTPCLIENT_F_ENDED only in release
authorWilliam Lallemand <wlallemand@haproxy.org>
Tue, 28 Sep 2021 08:10:07 +0000 (10:10 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 6 Oct 2021 13:15:03 +0000 (15:15 +0200)
Only set the HTTPCLIENT_F_ENDED flag in httpclient_applet_release()
function so we are sure that the appctx is not used anymore once the
flag is set.

src/http_client.c

index 9e5b2e8311de53f83ebb59089ec13c61d56105ed..3ea86c21e5cdd25be30b8b8da0fc722f577b8597 100644 (file)
@@ -578,7 +578,6 @@ static void httpclient_applet_io_handler(struct appctx *appctx)
                                         * set, leave (no body) */
                                        if (htx_is_empty(htx) && htx->flags & HTX_FL_EOM) {
                                                appctx->st0 = HTTPCLIENT_S_RES_END;
-                                               hc->flags |= HTTPCLIENT_F_ENDED;
                                        } else {
                                                appctx->st0 = HTTPCLIENT_S_RES_BODY;
                                        }