You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2010/08/20 02:54:34 UTC

svn commit: r987359 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_proxy.xml modules/proxy/mod_proxy.c modules/proxy/mod_proxy_balancer.c

Author: trawick
Date: Fri Aug 20 00:54:34 2010
New Revision: 987359

URL: http://svn.apache.org/viewvc?rev=987359&view=rev
Log:
mod_proxy: Rename erroronstatus to failonstatus...

... by popular demand, and add documentation.

Submitted by: Daniel Ruggeri <DRuggeri primary.net>


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml
    httpd/httpd/trunk/modules/proxy/mod_proxy.c
    httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=987359&r1=987358&r2=987359&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri Aug 20 00:54:34 2010
@@ -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
 

Modified: httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml?rev=987359&r1=987358&r2=987359&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml Fri Aug 20 00:54:34 2010
@@ -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>

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=987359&r1=987358&r2=987359&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Fri Aug 20 00:54:34 2010
@@ -381,7 +381,7 @@ static const char *set_balancer_param(pr
         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(pr
                 *(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);
         }

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?rev=987359&r1=987358&r2=987359&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Fri Aug 20 00:54:34 2010
@@ -628,7 +628,7 @@ static int proxy_balancer_post_request(p
             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();