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.
This commit is contained in:
Christopher Faulet 2021-03-25 17:29:38 +01:00
parent a434a00864
commit 2e96194d00

View 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},