MINOR: log: Don't systematically set LW_REQ when a sample expr is added

When a log-format string is parsed, if a sample fetch is found, the flag LW_REQ
is systematically added on the proxy. Unfortunately, this produce a warning
during HAProxy start-up when a log-format string is used for a tcp-check send
rule. Now this flag is only added if the parsed sample fetch depends on HTTP
information.
This commit is contained in:
Christopher Faulet 2020-04-06 18:29:14 +02:00
parent 5f940703b3
commit d2236cdcc4

View File

@ -532,7 +532,8 @@ int add_sample_to_logformat_list(char *text, char *arg, int arg_len, struct prox
* now on, but this will leave with sample capabilities soon.
*/
curpx->to_log |= LW_XPRT;
curpx->to_log |= LW_REQ;
if (curpx->http_needed)
curpx->to_log |= LW_REQ;
LIST_ADDQ(list_format, &node->list);
return 1;