1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

Expose the path that the balancer handles...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207582 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Jagielski
2011-11-28 20:46:53 +00:00
parent ef5be92f5e
commit 71f487a7b9
2 changed files with 10 additions and 2 deletions

View File

@@ -1455,6 +1455,9 @@ static const char *
if (err) if (err)
return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL); return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
} }
else {
ap_proxy_update_balancer(cmd->pool, balancer, f);
}
for (i = 0; i < arr->nelts; i++) { for (i = 0; i < arr->nelts; i++) {
const char *err = set_balancer_param(conf, cmd->pool, balancer, elts[i].key, const char *err = set_balancer_param(conf, cmd->pool, balancer, elts[i].key,
elts[i].val); elts[i].val);

View File

@@ -1198,10 +1198,10 @@ static int balancer_handler(request_rec *r)
balancer->s->name + sizeof(BALANCER_PREFIX) - 1, balancer->s->name + sizeof(BALANCER_PREFIX) - 1,
"&nonce=", balancer->s->nonce, "&nonce=", balancer->s->nonce,
"'>", NULL); "'>", NULL);
ap_rvputs(r, balancer->s->name, "</a></h3>\n\n", NULL); ap_rvputs(r, balancer->s->name, "</a></h3>\n", NULL);
ap_rputs("\n\n<table border='0' style='text-align: left;'><tr>" ap_rputs("\n\n<table border='0' style='text-align: left;'><tr>"
"<th>MaxMembers</th><th>StickySession</th><th>DisableFailover</th><th>Timeout</th><th>FailoverAttempts</th><th>Method</th>" "<th>MaxMembers</th><th>StickySession</th><th>DisableFailover</th><th>Timeout</th><th>FailoverAttempts</th><th>Method</th>"
"</tr>\n<tr>", r); "<th>Path</th></tr>\n<tr>", r);
/* the below is a safe cast, since the number of slots total will /* the below is a safe cast, since the number of slots total will
* never be more than max_workers, which is restricted to int */ * never be more than max_workers, which is restricted to int */
ap_rprintf(r, "<td align='center'>%d [%d Used]</td>\n", balancer->max_workers, ap_rprintf(r, "<td align='center'>%d [%d Used]</td>\n", balancer->max_workers,
@@ -1225,6 +1225,11 @@ static int balancer_handler(request_rec *r)
ap_rprintf(r, "<td align='center'>%d</td>\n", balancer->s->max_attempts); ap_rprintf(r, "<td align='center'>%d</td>\n", balancer->s->max_attempts);
ap_rprintf(r, "<td align='center'>%s</td>\n", ap_rprintf(r, "<td align='center'>%s</td>\n",
balancer->s->lbpname); balancer->s->lbpname);
ap_rputs("<td align='center'>", r);
if (balancer->s->vhost && *(balancer->s->vhost)) {
ap_rvputs(r, balancer->s->vhost, " -> ", NULL);
}
ap_rvputs(r, balancer->s->vpath, "</td>\n", NULL);
ap_rputs("</table>\n<br />", r); ap_rputs("</table>\n<br />", r);
ap_rputs("\n\n<table border='0' style='text-align: left;'><tr>" ap_rputs("\n\n<table border='0' style='text-align: left;'><tr>"
"<th>Worker URL</th>" "<th>Worker URL</th>"