BUG/MEDIUM: lua: Lua applets must not fetch samples using http_txn
If a sample fetch needing http_txn is called from an HTTP Lua applet,
the result will be invalid and may even cause a crash because some HTTP
data can be forwarded and the HTTP txn is no longer valid.
Here the solution is to ensure that a fetch called from Lua never
needs http_txn. This is done thanks to a new flag HLUA_F_MAY_USE_HTTP
which indicates whether or not it is safe to call a fetch which needs
HTTP.
This fix needs to be backported to 1.6.
diff --git a/include/types/hlua.h b/include/types/hlua.h
index fd7b7d3..a923624 100644
--- a/include/types/hlua.h
+++ b/include/types/hlua.h
@@ -30,6 +30,7 @@
#define HLUA_MUST_GC 0x00000020
#define HLUA_F_AS_STRING 0x01
+#define HLUA_F_MAY_USE_HTTP 0x02
enum hlua_exec {
HLUA_E_OK = 0,