]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: vars: smp_fetch_var() doesn't depend on HTTP but on the session
authorWilly Tarreau <w@1wt.eu>
Fri, 21 Oct 2016 15:17:18 +0000 (17:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 21 Oct 2016 15:53:46 +0000 (17:53 +0200)
Thus the SMP_USE_HTTP_ANY dependency is incorrect, we have to depend on
SMP_USE_L5_CLI (the session). It's particularly important for session-wide
variables which are kept across HTTP requests. For now there is no impact
but it will make a difference with tcp-request session rules.

src/vars.c

index 4a0c4ed350022d5bb30e9fbdeac51d7d377fe718..a3dd85ce4bc1b19096b2a9a2f38c31104734e238 100644 (file)
@@ -654,7 +654,7 @@ static int vars_max_size_reqres(char **args, int section_type, struct proxy *cur
 
 static struct sample_fetch_kw_list sample_fetch_keywords = {ILH, {
 
-       { "var", smp_fetch_var, ARG1(1,STR), smp_check_var, SMP_T_STR, SMP_USE_HTTP_ANY },
+       { "var", smp_fetch_var, ARG1(1,STR), smp_check_var, SMP_T_STR, SMP_USE_L5CLI },
        { /* END */ },
 }};