]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: hlua: Remove useless test on TX_CON_WANT_* flags
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Jul 2019 12:28:23 +0000 (14:28 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 07:24:12 +0000 (09:24 +0200)
When an HTTP applet is initialized, it is useless to force server-close mode on
the HTTP transaction because the connection mode is now handled by muxes. In
HTX, during analysis, the flag TX_CON_WANT_CLO is set by default in
htx_wait_for_request(), and TX_CON_WANT_SCL is never tested anywere.

src/hlua.c

index 8c9b2b161ed0227ed0edfd3eeb5d891bd37091c2..78c6235128908a4ff6a8bb09dfb907b2e0b74ecc 100644 (file)
@@ -6477,16 +6477,6 @@ static int hlua_applet_http_init(struct appctx *ctx, struct proxy *px, struct st
        const char *error;
 
        txn = strm->txn;
-
-       /* We want two things in HTTP mode :
-        *  - enforce server-close mode if we were in keep-alive, so that the
-        *    applet is released after each response ;
-        *  - enable request body transfer to the applet in order to resync
-        *    with the response body.
-        */
-       if ((txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_KAL)
-               txn->flags = (txn->flags & ~TX_CON_WANT_MSK) | TX_CON_WANT_SCL;
-
        hlua = pool_alloc(pool_head_hlua);
        if (!hlua) {
                SEND_ERR(px, "Lua applet http '%s': out of memory.\n",