]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: htx: Make internal.strm.is_htx an internal sample fetch
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Mar 2021 16:29:38 +0000 (17:29 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 1 Apr 2021 13:34:22 +0000 (15:34 +0200)
It is not really a context-less sample fetch, but it is internal. And it
only fails if no stream is attached to the sample. This way, it is still
possible to use it on an HTTP proxy (L6 sample fetches are ignored now for
HTTP proxies).

If the commit "BUG/MINOR: payload/htx: Ingore L6 sample fetches for HTX
streams/checks" is backported, it may be a good idea to backport this one
too. But only as far as 2.2.

src/http_htx.c

index 1444cf67d08694fc73d9985f900d724e97f2caca..fcfadce2bafdd9f6dc94411f24632b801ba1298c 100644 (file)
@@ -2729,7 +2729,7 @@ int val_blk_arg(struct arg *arg, char **err_msg)
  * Note: htx sample fetches should only used for development purpose.
  */
 static struct sample_fetch_kw_list sample_fetch_keywords = {ILH, {
-       { "internal.strm.is_htx",         smp_fetch_is_htx,           0,            NULL,           SMP_T_BOOL, SMP_USE_L6REQ },
+       { "internal.strm.is_htx",         smp_fetch_is_htx,           0,            NULL,           SMP_T_BOOL, SMP_USE_INTRN },
 
        { "internal.htx.nbblks",          smp_fetch_htx_nbblks,       0,            NULL,           SMP_T_SINT,  SMP_USE_HRQHV|SMP_USE_HRSHV},
        { "internal.htx.size",            smp_fetch_htx_size,         0,            NULL,           SMP_T_SINT,  SMP_USE_HRQHV|SMP_USE_HRSHV},