]> granicus.if.org Git - apache/commitdiff
Actually, do the nulling indepedent of whether it is being
authorJim Jagielski <jim@apache.org>
Tue, 2 Feb 2016 20:49:23 +0000 (20:49 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 2 Feb 2016 20:49:23 +0000 (20:49 +0000)
set or not.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728209 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_balancer.c

index 22df6d07a094f14dc4ba1f2573ca25d0e8ab2eb6..77cdced7b9907eac2860af990316b0e29bf7e858 100644 (file)
@@ -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;