summaryrefslogtreecommitdiff
path: root/modules/proxy/mod_proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/proxy/mod_proxy.c')
-rw-r--r--modules/proxy/mod_proxy.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index 09ef3a72..9e78853d 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -213,8 +213,14 @@ static const char *set_worker_param(apr_pool_t *p,
else
worker->status &= ~PROXY_WORKER_IN_ERROR;
}
+ else if (*v == 'H' || *v == 'h') {
+ if (mode)
+ worker->status |= PROXY_WORKER_HOT_STANDBY;
+ else
+ worker->status &= ~PROXY_WORKER_HOT_STANDBY;
+ }
else {
- return "Unknow status parameter option";
+ return "Unknown status parameter option";
}
}
}
@@ -238,6 +244,21 @@ static const char *set_worker_param(apr_pool_t *p,
else
worker->flush_wait = ival * 1000; /* change to microseconds */
}
+ else if (!strcasecmp(key, "lbset")) {
+ ival = atoi(val);
+ if (ival < 0 || ival > 99)
+ return "lbset must be between 0 and 99";
+ worker->lbset = ival;
+ }
+ else if (!strcasecmp(key, "ping")) {
+ /* Ping/Pong timeout in seconds.
+ */
+ ival = atoi(val);
+ if (ival < 1)
+ return "Ping/Pong timeout must be at least one second";
+ worker->ping_timeout = apr_time_from_sec(ival);
+ worker->ping_timeout_set = 1;
+ }
else {
return "unknown Worker parameter";
}
@@ -1794,7 +1815,7 @@ static int proxy_status_hook(request_rec *r, int flags)
ap_rputs("\n\n<table border=\"0\"><tr>"
"<th>Sch</th><th>Host</th><th>Stat</th>"
"<th>Route</th><th>Redir</th>"
- "<th>F</th><th>Acc</th><th>Wr</th><th>Rd</th>"
+ "<th>F</th><th>Set</th><th>Acc</th><th>Wr</th><th>Rd</th>"
"</tr>\n", r);
worker = (proxy_worker *)balancer->workers->elts;
@@ -1813,7 +1834,8 @@ static int proxy_status_hook(request_rec *r, int flags)
ap_rvputs(r, "</td><td>", worker->s->route, NULL);
ap_rvputs(r, "</td><td>", worker->s->redirect, NULL);
ap_rprintf(r, "</td><td>%d</td>", worker->s->lbfactor);
- ap_rprintf(r, "<td>%d</td><td>", (int)(worker->s->elected));
+ ap_rprintf(r, "<td>%d</td>", worker->s->lbset);
+ ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td><td>", worker->s->elected);
ap_rputs(apr_strfsize(worker->s->transferred, fbuf), r);
ap_rputs("</td><td>", r);
ap_rputs(apr_strfsize(worker->s->read, fbuf), r);