mod_proxy: Rename erroronstatus to failonstatus...
authorJeff Trawick <trawick@apache.org>
Fri, 20 Aug 2010 00:54:34 +0000 (00:54 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 20 Aug 2010 00:54:34 +0000 (00:54 +0000)
... 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

CHANGES
docs/manual/mod/mod_proxy.xml
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy_balancer.c

diff --git a/CHANGES b/CHANGES
index c2355331a18492c9cf0ca6aab7550c36fceb9ffa..9060ecf57b5e6e70c194a72535d7e2e238a3d7d3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 
 Changes with Apache 2.3.8
 
+  *) mod_proxy: Rename erroronstatus to failonstatus.
+     [Daniel Ruggeri <DRuggeri primary.net>]
 
 Changes with Apache 2.3.7
 
index abdb2ce66794111e14fc32ee8959aea556256310..a7706dd4160f64c35747761c558ec4dd4cc8b996 100644 (file)
@@ -864,6 +864,12 @@ expressions</description>
         <td>Balancer timeout in seconds. If set this will be the maximum time
         to wait for a free worker. Default is not to wait. 
     </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>
     <p>A sample balancer setup</p>
index f4ba275abd5a203ae6247be08b24e4bd1e761579..16ec4f931c05a1680034e073da8d002b9f98cc6e 100644 (file)
@@ -381,7 +381,7 @@ static const char *set_balancer_param(proxy_server_conf *conf,
         else
             return "scolonpathdelim must be On|Off";
     }
-    else if (!strcasecmp(key, "erroronstatus")) {
+    else if (!strcasecmp(key, "failonstatus")) {
         char *val_split;
         char *status;
         char *tok_state;
@@ -397,7 +397,7 @@ static const char *set_balancer_param(proxy_server_conf *conf,
                 *(int *)apr_array_push(balancer->errstatuses) = ival;
             }
             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);
         }
index 1a53053ed41e43d1fc60f60b049e13400661a288..107dc478654f4349c4bab372d18c5ca8280af194 100644 (file)
@@ -628,7 +628,7 @@ static int proxy_balancer_post_request(proxy_worker *worker,
             int val = ((int *)balancer->errstatuses->elts)[i];
             if (r->status == val) {
                 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);
                 worker->s->status |= PROXY_WORKER_IN_ERROR;
                 worker->s->error_time = apr_time_now();