From: Ruediger Pluem Date: Wed, 5 Dec 2007 09:37:23 +0000 (+0000) Subject: * Merge r551099 from trunk: X-Git-Tag: 2.2.7~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9e23cea87ba2aa7216a63e772944ff84499026f;p=thirdparty%2Fapache%2Fhttpd.git * Merge r551099 from trunk: mod_proxy_balancer: Remove the broken attempt to change balancer params on-the-fly via the admin manager. Submitted by: jfclere Reviewed by: jim, rpluem, trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@601272 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 870bb63a7a0..67d1262e169 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -2017,7 +2017,12 @@ static int proxy_status_hook(request_rec *r, int flags) ap_rputs("\n\n" "" "\n", r); - ap_rvputs(r, "", apr_time_sec(balancer->timeout)); ap_rprintf(r, "\n", diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 966f259e23c..8a28b6ffa28 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -650,33 +650,10 @@ static int balancer_handler(request_rec *r) } } /* First set the params */ - if (bsel) { - const char *val; - if ((val = apr_table_get(params, "ss"))) { - if (strlen(val)) - bsel->sticky = apr_pstrdup(conf->pool, val); - else - bsel->sticky = NULL; - } - if ((val = apr_table_get(params, "tm"))) { - int ival = atoi(val); - if (ival >= 0) - bsel->timeout = apr_time_from_sec(ival); - } - if ((val = apr_table_get(params, "fa"))) { - int ival = atoi(val); - if (ival >= 0) - bsel->max_attempts = ival; - bsel->max_attempts_set = 1; - } - if ((val = apr_table_get(params, "lm"))) { - proxy_balancer_method *provider; - provider = ap_lookup_provider(PROXY_LBMETHOD, val, "0"); - if (provider) { - bsel->lbmethod = provider; - } - } - } + /* + * Note that it is not possible set the proxy_balancer because it is not + * in shared memory. + */ if (wsel) { const char *val; if ((val = apr_table_get(params, "lf"))) { @@ -756,14 +733,16 @@ static int balancer_handler(request_rec *r) for (i = 0; i < conf->balancers->nelts; i++) { ap_rputs("
\n

LoadBalancer Status for ", r); - ap_rvputs(r, "uri, "?b=", - balancer->name + sizeof("balancer://") - 1, - "\">", NULL); - ap_rvputs(r, balancer->name, "

\n\n", NULL); + ap_rvputs(r, balancer->name, "\n\n", NULL); ap_rputs("\n\n
SSesTimeoutMethod
", balancer->sticky, NULL); + if (balancer->sticky) { + ap_rvputs(r, "", balancer->sticky, NULL); + } + else { + ap_rputs(" - ", r); + } ap_rprintf(r, "%" APR_TIME_T_FMT "%s
" "" "\n", r); - ap_rvputs(r, "", apr_time_sec(balancer->timeout)); ap_rprintf(r, "\n", balancer->max_attempts); @@ -824,10 +803,10 @@ static int balancer_handler(request_rec *r) ap_rputs("\n", wsel->s->lbset); ap_rputs("\n", r); ap_rputs("\n", r); ap_rputs("
StickySessionTimeoutFailoverAttemptsMethod
", balancer->sticky, NULL); + if (balancer->sticky) { + ap_rvputs(r, "", balancer->sticky, NULL); + } + else { + ap_rputs(" - ", r); + } ap_rprintf(r, "%" APR_TIME_T_FMT "%d
LB Set:
Route:route, NULL); + ap_rvputs(r, "value=\"", wsel->s->route, NULL); ap_rputs("\">
Route Redirect:redirect, NULL); + ap_rvputs(r, "value=\"", wsel->s->redirect, NULL); ap_rputs("\">
Status:Disabled: s->status & PROXY_WORKER_DISABLED) @@ -844,41 +823,6 @@ static int balancer_handler(request_rec *r) "\">\n\n", NULL); ap_rputs("
\n", r); } - else if (bsel) { - ap_rputs("

Edit balancer settings for ", r); - ap_rvputs(r, bsel->name, "

\n", NULL); - ap_rvputs(r, "
uri, "\">\n
", NULL); - ap_rputs("\n\n", - apr_time_sec(bsel->timeout)); - ap_rputs("\n", - bsel->max_attempts); - ap_rputs("\n", r); - ap_rputs("\n", r); - ap_rvputs(r, "
StickySession Identifier:sticky) - ap_rvputs(r, "value=\"", bsel->sticky, "\"", NULL); - ap_rputs(">
Timeout:
Failover Attempts:
LB Method:
\nname + sizeof("balancer://") - 1, - "\">\n\n", NULL); - ap_rputs("
\n", r); - } ap_rputs(ap_psignature("",r), r); ap_rputs("\n", r); }