MINOR: proxy: report a warning for max_ka_queue in proxy_cfg_ensure_no_http()

Display a warning when max_ka_queue is set (it is the case when
"max-keep-alive-queue" directive is used within a proxy section) to inform
the user that this directives depends on the "http" mode to work and thus
will safely be ignored.
This commit is contained in:
Aurelien DARRAGON 2023-09-19 18:48:23 +02:00 committed by Christopher Faulet
parent 65f1124b5d
commit 3934901e51
1 changed files with 4 additions and 0 deletions

View File

@ -1294,6 +1294,10 @@ struct server *findserver_unique_name(const struct proxy *px, const char *name,
*/
int proxy_cfg_ensure_no_http(struct proxy *curproxy)
{
if (curproxy->max_ka_queue) {
ha_warning("max_ka_queue will be ignored for %s '%s' (needs 'mode http').\n",
proxy_type_str(curproxy), curproxy->id);
}
if (curproxy->cookie_name != NULL) {
ha_warning("cookie will be ignored for %s '%s' (needs 'mode http').\n",
proxy_type_str(curproxy), curproxy->id);