diff --git a/src/hlua.c b/src/hlua.c index 13e03cef73..79b486da8e 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -4240,6 +4240,11 @@ __LJMP static int hlua_applet_htx_getline_yield(lua_State *L, int status, lua_KC uint32_t vlen; char *nl; + if (type == HTX_BLK_EOM) { + stop = 1; + break; + } + vlen = sz; if (vlen > count) { if (type != HTX_BLK_DATA) @@ -4409,6 +4414,11 @@ __LJMP static int hlua_applet_htx_recv_yield(lua_State *L, int status, lua_KCont struct ist v; uint32_t vlen; + if (type == HTX_BLK_EOM) { + len = 0; + break; + } + vlen = sz; if (len > 0 && vlen > len) vlen = len;