From: Jim Jagielski Date: Fri, 12 Aug 2005 15:31:03 +0000 (+0000) Subject: When using the LB Balancer manager, if you disabled X-Git-Tag: 2.1.7~5^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=487504d63ba7f1a7723ac3c41122c798b4c518b1;p=apache When using the LB Balancer manager, if you disabled a member, then clicked on another member and/or itself again, the member would be re-enabled. This was due to the form being "submitted" and 'dw' being null (observed with Safari). Anyway, moving to a radio makes it explicit. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232314 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 38314b26df..af409f67a2 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -691,10 +691,12 @@ static int balancer_handler(request_rec *r) else *wsel->s->redirect = '\0'; } - if ((val = apr_table_get(params, "dw"))) - wsel->s->status |= PROXY_WORKER_DISABLED; - else - wsel->s->status &= ~PROXY_WORKER_DISABLED; + if ((val = apr_table_get(params, "dw"))) { + if (!strcasecmp(val, "Disable")) + wsel->s->status |= PROXY_WORKER_DISABLED; + else if (!strcasecmp(val, "Enable")) + wsel->s->status &= ~PROXY_WORKER_DISABLED; + } } if (apr_table_get(params, "xml")) { @@ -801,9 +803,12 @@ static int balancer_handler(request_rec *r) ap_rputs("Route Redirect:redirect, NULL); ap_rputs("\">\n", r); - ap_rputs("Disabled:Status:Disabled: s->status & PROXY_WORKER_DISABLED) ap_rputs(" checked", r); + ap_rputs("> | Enabled: s->status & PROXY_WORKER_DISABLED)) + ap_rputs(" checked", r); ap_rputs(">\n", r); ap_rputs("\n", r); ap_rvputs(r, "\n