You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2016/02/02 21:49:23 UTC
svn commit: r1728209 - /httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
Author: jim
Date: Tue Feb 2 20:49:23 2016
New Revision: 1728209
URL: http://svn.apache.org/viewvc?rev=1728209&view=rev
Log:
Actually, do the nulling indepedent of whether it is being
set or not.
Modified:
httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?rev=1728209&r1=1728208&r2=1728209&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Tue Feb 2 20:49:23 2016
@@ -1165,13 +1165,15 @@ static int balancer_handler(request_rec
*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;