luci-lib-docker: fix chunked decode

Signed-off-by: Ren Zongjia <acooler15@foxmail.com>
This commit is contained in:
lisaac 2021-08-26 08:57:55 +08:00 committed by Ren Zongjia
parent 75c6251c6e
commit 54a55e8371

View file

@ -21,7 +21,7 @@ local chunksource = function(sock, buffer)
local output local output
local _, endp, count = buffer:find("^([0-9a-fA-F]+)\r\n") local _, endp, count = buffer:find("^([0-9a-fA-F]+)\r\n")
if not count then while not count do
local newblock, code = sock:recv(1024) local newblock, code = sock:recv(1024)
if not newblock then if not newblock then
return nil, code return nil, code