]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: lua: Lua applets must not use http_txn
authorThierry FOURNIER <tfournier@arpalert.org>
Sun, 20 Dec 2015 18:14:52 +0000 (19:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 20 Dec 2015 22:13:00 +0000 (23:13 +0100)
commitd93ea2b603f4ecae2c8139deb9483e7c9d4ffc17
treee54c8c50c6786707f7357cee1d1564748a082f3c
parentca98866bcf80fd13998adcacc0a8d7213714c974
BUG/MINOR: lua: Lua applets must not use http_txn

In certain circumstances (eg: Lua HTTP applet called from a
TCP ruleset before http_process_request()), the HTTP TXN is not
yet fully initialized so some information it contains cannot be
relied on. Such information include the HTTP version, the state
of the expect: 100-continue header, the connection header and
the transfer-encoding header.

Here the bug only turns something which already doesn't work
into something wrong, but better avoid any references to the
http_txn from the Lua code to avoid future mistakes.

This patch should be backported into 1.6 for code consistency.
src/hlua.c