You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jf...@apache.org on 2022/04/01 10:30:07 UTC

svn commit: r1899479 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy.c modules/proxy/mod_proxy.h

Author: jfclere
Date: Fri Apr  1 10:30:06 2022
New Revision: 1899479

URL: http://svn.apache.org/viewvc?rev=1899479&view=rev
Log:

Revert r1899390.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/proxy/mod_proxy.c
    httpd/httpd/trunk/modules/proxy/mod_proxy.h

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1899479&r1=1899478&r2=1899479&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri Apr  1 10:30:06 2022
@@ -1,10 +1,6 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
-  *) mod_proxy: Add WorkerBalancerGrowth to allow adding workers to
-     balancer created dynamically or via "empty" <Proxy balancer://../>
-     [Jean-Frederic Clere]
-
   *) ab: Add an optional ramp delay when starting concurrent connections so
      as to not trigger denial of service protection in the network. Report
      levels of concurrency achieved in cases where the test completes before

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1899479&r1=1899478&r2=1899479&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Fri Apr  1 10:30:06 2022
@@ -1633,8 +1633,6 @@ static void * create_proxy_config(apr_po
     ps->ppinherit_set = 0;
     ps->bgrowth = 5;
     ps->bgrowth_set = 0;
-    ps->wbgrowth = 0;
-    ps->wbgrowth_set = 0;
     ps->req_set = 0;
     ps->recv_buffer_size = 0; /* this default was left unset for some reason */
     ps->recv_buffer_size_set = 0;
@@ -1791,8 +1789,6 @@ static void * merge_proxy_config(apr_poo
     ps->req_set = overrides->req_set || base->req_set;
     ps->bgrowth = (overrides->bgrowth_set == 0) ? base->bgrowth : overrides->bgrowth;
     ps->bgrowth_set = overrides->bgrowth_set || base->bgrowth_set;
-    ps->wbgrowth = (overrides->wbgrowth_set == 0) ? base->wbgrowth : overrides->wbgrowth;
-    ps->wbgrowth_set = overrides->wbgrowth_set || base->wbgrowth_set;
     ps->max_balancers = overrides->max_balancers || base->max_balancers;
     ps->bal_persist = overrides->bal_persist;
     ps->recv_buffer_size = (overrides->recv_buffer_size_set == 0) ? base->recv_buffer_size : overrides->recv_buffer_size;
@@ -2668,21 +2664,6 @@ static const char *set_bgrowth(cmd_parms
     return NULL;
 }
 
-static const char *set_wbgrowth(cmd_parms *parms, void *dummy, const char *arg)
-{
-    proxy_server_conf *psf =
-    ap_get_module_config(parms->server->module_config, &proxy_module);
-
-    int growth = atoi(arg);
-    if (growth < 0 || growth > 1000) {
-        return "WorkerBalancerGrowth must be between 0 and 1000";
-    }
-    psf->wbgrowth = growth;
-    psf->wbgrowth_set = 1;
-
-    return NULL;
-}
-
 static const char *set_persist(cmd_parms *parms, void *dummy, int flag)
 {
     proxy_server_conf *psf =
@@ -3066,35 +3047,6 @@ static const char *proxysection(cmd_parm
                 return apr_pstrcat(cmd->temp_pool, thiscmd->name, " ", err, " ",
                                    word, "=", val, "; ", conf->p, NULL);
         }
-    } else {
-        /* we have an empty <Proxy/> */
-        if (!ap_strchr_c(conf->p, ':'))
-            return apr_pstrcat(cmd->pool, thiscmd->name,
-                               "> arguments are not supported for non url.",
-                               NULL);
-        if (ap_proxy_valid_balancer_name((char *)conf->p, 9)) {
-            balancer = ap_proxy_get_balancer(cmd->pool, sconf, conf->p, 0);
-            if (!balancer) {
-                err = ap_proxy_define_balancer(cmd->pool, &balancer,
-                                               sconf, conf->p, "/", 0);
-                if (err)
-                    return apr_pstrcat(cmd->temp_pool, thiscmd->name,
-                                       " ", err, NULL);
-            }
-            if (!balancer->section_config) {
-                balancer->section_config = new_dir_conf;
-            }
-            /* Allow to add members dynamically */
-            if (sconf->wbgrowth_set) {
-                balancer->growth = sconf->wbgrowth;
-                balancer->growth_set = 1;
-            } else {
-                return apr_pstrcat(cmd->temp_pool, thiscmd->name, "/> requires WorkerBalancerGrowth > 0.", NULL);
-            }
-        } else {
-            return apr_pstrcat(cmd->pool, thiscmd->name, " " ,conf->p,
-                               "> only balancer://balancername is supported.", NULL);
-        }
     }
 
     cmd->path = old_path;
@@ -3157,8 +3109,6 @@ static const command_rec proxy_cmds[] =
      "A balancer name and scheme with list of params"),
     AP_INIT_TAKE1("BalancerGrowth", set_bgrowth, NULL, RSRC_CONF,
      "Number of additional Balancers that can be added post-config"),
-    AP_INIT_TAKE1("WorkerBalancerGrowth", set_wbgrowth, NULL, RSRC_CONF,
-     "Number of additional Workers per Balancer that can be added post-config"),
     AP_INIT_FLAG("BalancerPersist", set_persist, NULL, RSRC_CONF,
      "on if the balancer should persist changes on reboot/restart made via the Balancer Manager"),
     AP_INIT_FLAG("BalancerInherit", set_inherit, NULL, RSRC_CONF,

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.h?rev=1899479&r1=1899478&r2=1899479&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.h (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.h Fri Apr  1 10:30:06 2022
@@ -163,7 +163,6 @@ typedef struct {
     int req;                /* true if proxy requests are enabled */
     int max_balancers;      /* maximum number of allowed balancers */
     int bgrowth;            /* number of post-config balancers can added */
-    int wbgrowth;            /* number of post-config work per balancer that can added */
     enum {
       via_off,
       via_on,
@@ -199,7 +198,6 @@ typedef struct {
     unsigned int proxy_status_set:1;
     unsigned int source_address_set:1;
     unsigned int bgrowth_set:1;
-    unsigned int wbgrowth_set:1;
     unsigned int bal_persist:1;
     unsigned int inherit:1;
     unsigned int inherit_set:1;