]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1856829 from trunk:
authorStefan Eissing <icing@apache.org>
Tue, 30 Jul 2019 13:11:39 +0000 (13:11 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 30 Jul 2019 13:11:39 +0000 (13:11 +0000)
  *) mod_proxy: Load balancer byrequests required when bytraffic chosen
     PR 62372

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

STATUS
modules/proxy/proxy_util.c

diff --git a/STATUS b/STATUS
index 5138aeec4364613b998f8925a7cd303243f3d6f9..a9d0adcbc2726a07b15a9d4d8fb890aac732690c 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -127,16 +127,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_proxy: Load balancer byrequests required when bytraffic chosen
-     PR 62372
-     CHANGES suggestion:
-     *) mod_proxy_balancer: Load balancer required byrequests when bytraffic chosen.
-        PR 62372. [Jim Jagielski]
-     trunk:
-        http://svn.apache.org/r1856829
-     2.4.x patch: svn merge -c 1856829 ^/httpd/httpd/trunk .
-     +1: rjung, jim, icing
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index 48ef2921df9d0af96dd3483ed5510faa6242a6aa..0315668296e305493f66329f086a65649f57c057 100644 (file)
@@ -1172,11 +1172,11 @@ PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
      * exist, that's OK at this time. We check when we share and sync
      */
     lbmethod = ap_lookup_provider(PROXY_LBMETHOD, "byrequests", "0");
-
+    (*balancer)->lbmethod = lbmethod;
+    
     (*balancer)->workers = apr_array_make(p, 5, sizeof(proxy_worker *));
     (*balancer)->gmutex = NULL;
     (*balancer)->tmutex = NULL;
-    (*balancer)->lbmethod = lbmethod;
 
     if (do_malloc)
         bshared = ap_malloc(sizeof(proxy_balancer_shared));
@@ -1190,6 +1190,8 @@ PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
     if (PROXY_STRNCPY(bshared->name, uri) != APR_SUCCESS) {
         return apr_psprintf(p, "balancer name (%s) too long", uri);
     }
+    (*balancer)->lbmethod_set = 1;
+
     /*
      * We do the below for verification. The real sname will be
      * done post_config
@@ -1244,6 +1246,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_balancer(proxy_balancer *balancer,
     lbmethod = ap_lookup_provider(PROXY_LBMETHOD, balancer->s->lbpname, "0");
     if (lbmethod) {
         balancer->lbmethod = lbmethod;
+        balancer->lbmethod_set = 1;
     } else {
         ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, APLOGNO(02432)
                      "Cannot find LB Method: %s", balancer->s->lbpname);