From: Jim Jagielski Date: Tue, 2 Feb 2016 20:49:23 +0000 (+0000) Subject: Actually, do the nulling indepedent of whether it is being X-Git-Tag: 2.5.0-alpha~2216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e81d9afe33e90970295ed0dbec6f7d7ac66a7df4;p=thirdparty%2Fapache%2Fhttpd.git Actually, do the nulling indepedent of whether it is being set or not. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728209 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 22df6d07a09..77cdced7b99 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -1165,13 +1165,15 @@ static int balancer_handler(request_rec *r) *wsel->s->hcuri = '\0'; } if (hc_valid_expr_f && (val = apr_table_get(params, "w_he"))) { - if (strlen(val) && wsel->s->method != NONE && wsel->s->method != TCP && - hc_valid_expr_f(r, val) && strlen(val) < sizeof(wsel->s->hcexpr)) + if (strlen(val) && hc_valid_expr_f(r, val) && strlen(val) < sizeof(wsel->s->hcexpr)) strcpy(wsel->s->hcexpr, val); else *wsel->s->hcexpr = '\0'; } - + /* If the health check method doesn't support an expr, then null it */ + if (wsel->s->method == NONE || wsel->s->method == TCP) { + *wsel->s->hcexpr = '\0'; + } /* if enabling, we need to reset all lb params */ if (bsel && !was_usable && PROXY_WORKER_IS_USABLE(wsel)) { bsel->s->need_reset = 1;