]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: lua: Set right direction and flags on new HTTP objects
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 May 2019 09:14:21 +0000 (11:14 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 May 2019 07:07:57 +0000 (09:07 +0200)
When a LUA HTTP object is created using the current TXN object, it is important
to also set the right direction and flags, using ones from the TXN object.

This patch may be backported to all supported branches with the lua
support. But, it seems to have no impact for now.

src/hlua.c

index a7fd52baa73d4fb93afab21a2605d60bd9a7681d..f8e481c27a114c0dfe749e7ab6f2936e6751a059 100644 (file)
@@ -5170,6 +5170,8 @@ static int hlua_http_new(lua_State *L, struct hlua_txn *txn)
 
        htxn->s = txn->s;
        htxn->p = txn->p;
+       htxn->dir = txn->dir;
+       htxn->flags = txn->flags;
 
        /* Pop a class stream metatable and affect it to the table. */
        lua_rawgeti(L, LUA_REGISTRYINDEX, class_http_ref);