BUG/MINOR: lua: Add missing string length for lua sticktable lookup
authorNathan Neulinger <nneul@neulinger.org>
Wed, 4 Mar 2020 02:32:47 +0000 (20:32 -0600)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 May 2020 13:32:02 +0000 (15:32 +0200)
commit241d378c400da600cc08feac3269b47fdddc21c2
treee668fcc603dc5937160dfa5988a41bf0283eab24
parentf04244848065cced26b65034391e996420fb6d95
BUG/MINOR: lua: Add missing string length for lua sticktable lookup

In hlua_stktable_lookup(), the key length is never set so all
stktable:lookup("key") calls return nil from lua.

This patch must be backported as far as 1.9.

[Cf: I slightly updated the patch to use lua_tolstring() instead of
     luaL_checkstring() + strlen()]

(cherry picked from commit 31a841c323b0e9692695a57d4747f71a32b9fb68)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/hlua_fcn.c