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

mod_proxy: Rename erroronstatus to failonstatus...

... by popular demand, and add documentation.

Submitted by: Daniel Ruggeri <DRuggeri primary.net>



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@987359 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2010-08-20 00:54:34 +00:00
parent 6526baeced
commit 5a222cf2cf
4 changed files with 11 additions and 3 deletions

View File

@@ -2,6 +2,8 @@
Changes with Apache 2.3.8 Changes with Apache 2.3.8
*) mod_proxy: Rename erroronstatus to failonstatus.
[Daniel Ruggeri <DRuggeri primary.net>]
Changes with Apache 2.3.7 Changes with Apache 2.3.7

View File

@@ -864,6 +864,12 @@ expressions</description>
<td>Balancer timeout in seconds. If set this will be the maximum time <td>Balancer timeout in seconds. If set this will be the maximum time
to wait for a free worker. Default is not to wait. to wait for a free worker. Default is not to wait.
</td></tr> </td></tr>
<tr><td>failonstatus</td>
<td>-</td>
<td>A single or comma-separated list of HTTP status codes. If set this will
force the worker into error state when the backend returns any status code
in the list. Worker recovery behaves the same as other worker errors.
</td></tr>
</table> </table>
<p>A sample balancer setup</p> <p>A sample balancer setup</p>

View File

@@ -381,7 +381,7 @@ static const char *set_balancer_param(proxy_server_conf *conf,
else else
return "scolonpathdelim must be On|Off"; return "scolonpathdelim must be On|Off";
} }
else if (!strcasecmp(key, "erroronstatus")) { else if (!strcasecmp(key, "failonstatus")) {
char *val_split; char *val_split;
char *status; char *status;
char *tok_state; char *tok_state;
@@ -397,7 +397,7 @@ static const char *set_balancer_param(proxy_server_conf *conf,
*(int *)apr_array_push(balancer->errstatuses) = ival; *(int *)apr_array_push(balancer->errstatuses) = ival;
} }
else { else {
return "erroronstatus must be one or more HTTP response code"; return "failonstatus must be one or more HTTP response codes";
} }
status = apr_strtok(NULL, ", ", &tok_state); status = apr_strtok(NULL, ", ", &tok_state);
} }

View File

@@ -628,7 +628,7 @@ static int proxy_balancer_post_request(proxy_worker *worker,
int val = ((int *)balancer->errstatuses->elts)[i]; int val = ((int *)balancer->errstatuses->elts)[i];
if (r->status == val) { if (r->status == val) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server, ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
"proxy: BALANCER: (%s). Forcing recovery for worker (%s), erroronstatus %d", "proxy: BALANCER: (%s). Forcing recovery for worker (%s), failonstatus %d",
balancer->name, worker->name, val); balancer->name, worker->name, val);
worker->s->status |= PROXY_WORKER_IN_ERROR; worker->s->status |= PROXY_WORKER_IN_ERROR;
worker->s->error_time = apr_time_now(); worker->s->error_time = apr_time_now();