]> granicus.if.org Git - apache/commitdiff
mod_proxy: non-existance of byrequests is not an immediate error
authorGraham Leggett <minfrin@apache.org>
Sun, 13 Jan 2013 12:20:35 +0000 (12:20 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 13 Jan 2013 12:20:35 +0000 (12:20 +0000)
trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1428916

Submitted by: jim
Reviewed by: humbedooh, minfrin

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1432600 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index 111b7961f095ff3006d7af5febe78471431d246e..51ac42fe8f0c4870cf54256b0086427bf96425ed 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.4
 
+  * mod_proxy: non-existance of byrequests is not an immediate error.
+    [Jim Jagielski]
+
   *) mod_proxy_balancer: Improve output of balancer-manager (re: Drn,
      Dis, Ign, Stby). PR 52478 [Danijel <dt-ng rbfh de>]
   
diff --git a/STATUS b/STATUS
index 4db930000797fbf2f381a462a0e783597d0beabb..e57d12c9a887acb52b2468151ca79ad2200e7c04 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -91,11 +91,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * mod_proxy: non-existance of byrequests is not an immediate error
-    trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1428916
-    2.4.x patch: trunk patch works
-    +1: jim, humbedooh, minfrin
-
   * mod_slotmem_shm: Fix mistaken reset of num_free for restored shm
     trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1430869
     2.4.x patch: trunk patch works
index 110a00d182f11b89ec2a71601b29c9571e44facb..38976f7e7ee295b450eb44a353b2eb33c70df40d 100644 (file)
@@ -1149,13 +1149,10 @@ PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
     memset(*balancer, 0, sizeof(proxy_balancer));
 
     /*
-     * NOTE: The default method is byrequests, which we assume
-     * exists!
+     * NOTE: The default method is byrequests - if it doesn't
+     * exist, that's OK at this time. We check when we share and sync
      */
     lbmethod = ap_lookup_provider(PROXY_LBMETHOD, "byrequests", "0");
-    if (!lbmethod) {
-        return "Can't find 'byrequests' lb method";
-    }
 
     (*balancer)->workers = apr_array_make(p, 5, sizeof(proxy_worker *));
     (*balancer)->gmutex = NULL;
@@ -1213,9 +1210,13 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_balancer(proxy_balancer *balancer,
     balancer->s->index = i;
     /* the below should always succeed */
     lbmethod = ap_lookup_provider(PROXY_LBMETHOD, balancer->s->lbpname, "0");
-    if (lbmethod)
+    if (lbmethod) {
         balancer->lbmethod = lbmethod;
-
+    } else {
+        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, APLOGNO(02432)
+                     "Cannot find LB Method: %s", balancer->s->lbpname);
+        return APR_EINVAL;
+    }
     if (*balancer->s->nonce == PROXY_UNSET_NONCE) {
         char nonce[APR_UUID_FORMATTED_LENGTH + 1];
         apr_uuid_t uuid;
@@ -2701,7 +2702,12 @@ PROXY_DECLARE(apr_status_t) ap_proxy_sync_balancer(proxy_balancer *b, server_rec
     lbmethod = ap_lookup_provider(PROXY_LBMETHOD, b->s->lbpname, "0");
     if (lbmethod) {
         b->lbmethod = lbmethod;
+    } else {
+        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(02433)
+                     "Cannot find LB Method: %s", b->s->lbpname);
+        return APR_EINVAL;
     }
+
     /* worker sync */
 
     /*