From: Christopher Faulet Date: Thu, 25 Mar 2021 16:29:38 +0000 (+0100) Subject: MINOR: htx: Make internal.strm.is_htx an internal sample fetch X-Git-Tag: v2.4-dev15~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e96194d003b25f1ee91b9bd5e1d9d60108ea083;p=thirdparty%2Fhaproxy.git MINOR: htx: Make internal.strm.is_htx an internal sample fetch 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. --- diff --git a/src/http_htx.c b/src/http_htx.c index 1444cf67d0..fcfadce2ba 100644 --- a/src/http_htx.c +++ b/src/http_htx.c @@ -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},