BUG/MINOr: hlua: Fix receive from HTTP applet by properly accounting data
A regression was introduced when the commit
5b5ecf848 ("BUG/MINOR: hlua:
Skip headers when a receive is performed on an HTTP applet"). To work
properly, the way consumed data are accounted must be adapted. On the dev
version, the changes were hidden in the HTTP applet refactoring and were not
backported. Because of this issue, it is possible to freeze a lua HTTP
applet.
To fix the issue, the requested length of data to retrieved is only
evaluated when a DATA HTX blocked is processed. Otherwise, the blocked is
just skipped.
The bug was introduced to the 3.2. Thus, there is no upstream commit ID.
This patch should fix issue #3150. It shoukd be backported everywhere the
patch above was backported. So at least as far as 2.8 for now.
(cherry picked from commit
7259dffe8ea5bc820bc7b6d3c2ee0775a09063da)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit
59c9496b56059eb5b7144d4d507210a43f326195)
Signed-off-by: Willy Tarreau <w@1wt.eu>