1
0
mirror of http://git.haproxy.org/git/haproxy.git/ synced 2024-12-13 23:14:46 +00:00

MINOR: http: Add macros to check if a stream uses the HTX representation

To prepare the refactoring of the code handling HTTP messages, these macros will
help to use HTX functions instead of legacy ones when the new HTX internal
representation is in use. To do so, for a given stream, we will check if its
frontend has the option PR_O2_USE_HTX. It is useless to test backend options
because it is not possible to mix the HTX representation and the legacy one
(i.e, having an HTX frontend and a legacy backend or vice versa).
This commit is contained in:
Christopher Faulet 2018-10-03 14:25:40 +02:00 committed by Willy Tarreau
parent effc3750cc
commit 1d5b85aba2

View File

@ -29,6 +29,8 @@
#include <proto/channel.h>
#include <proto/h1.h>
#define IS_HTX_STRM(strm) (strm_fe(strm)->options2 & PR_O2_USE_HTX)
#define IS_HTX_SMP(smp) ((smp)->strm && IS_HTX_STRM((smp)->strm))
extern struct pool_head *pool_head_uniqueid;