]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Allow smax to be 0
authorJim Jagielski <jim@apache.org>
Tue, 7 Oct 2008 14:59:48 +0000 (14:59 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 7 Oct 2008 14:59:48 +0000 (14:59 +0000)
PR 43371

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

CHANGES
STATUS
modules/proxy/mod_proxy.c
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index f5a43bc4a998d8b215c57c1f5ed5cc0eef88f7a7..24e736d127a3fa09ce83c8d64de60b75fed82341 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,11 @@ Changes with Apache 2.2.10
      mod_proxy_ftp: Prevent XSS attacks when using wildcards in the path of
      the FTP URL. Discovered by Marc Bevand of Rapid7. [Ruediger Pluem]
 
+  *) Allow for smax to be 0 for balancer members so that all idle
+     connections are able to be dropped should they exceed ttl.
+     PR 43371 [Phil Endecott <spam_from_apache_bugzilla chezphil.org>,
+     Jim Jagielski]
+
   *) mod_proxy_http: Don't trigger a retry by the client if a failure to
      read the response line was the result of a timeout.
      [Adam Woodworth <mirkperl gmail.com>]
diff --git a/STATUS b/STATUS
index 1369e4b8335e9cd73a6e1d4251bb031ff702f67a..1115a3b165a6793b5974cc12b7da37813bd7199e 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -85,14 +85,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_proxy: Allow for the smax param to be 0, so that all connections
-     are available to be dropped, should they be idle long enough.
-     PR 43371
-     Trunk version of patch:
-       http://svn.apache.org/viewvc?rev=697093&view=rev
-    Backport version for 2.2.x of patch:
-       Trunk version of patch works
-   +1: jim, rpluem, gregames
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 15e7e8ef80a143085cc2b685b507417c8f836cc6..7aaa7da7af3199c509840b6dd2ec63fbe3bd0943 100644 (file)
@@ -92,7 +92,7 @@ static const char *set_worker_param(apr_pool_t *p,
     }
     else if (!strcasecmp(key, "ttl")) {
         /* Time in seconds that will destroy all the connections
-         * that exced the smax
+         * that exceed the smax
          */
         ival = atoi(val);
         if (ival < 1)
index 028bd1abc7973680377bd83a280f1f696ddd5689..194dbb1d7ee174882884cf8fab6131adc2c5e8c4 100644 (file)
@@ -1432,6 +1432,7 @@ PROXY_DECLARE(const char *) ap_proxy_add_worker(proxy_worker **worker,
     (*worker)->id   = proxy_lb_workers;
     (*worker)->flush_packets = flush_off;
     (*worker)->flush_wait = PROXY_FLUSH_WAIT;
+    (*worker)->smax = -1;
     /* Increase the total worker count */
     proxy_lb_workers++;
     init_conn_pool(p, *worker);
@@ -1452,6 +1453,7 @@ PROXY_DECLARE(proxy_worker *) ap_proxy_create_worker(apr_pool_t *p)
     proxy_worker *worker;
     worker = (proxy_worker *)apr_pcalloc(p, sizeof(proxy_worker));
     worker->id = proxy_lb_workers;
+    worker->smax = -1;
     /* Increase the total worker count */
     proxy_lb_workers++;
     init_conn_pool(p, worker);
@@ -1923,7 +1925,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
         if (worker->hmax == 0 || worker->hmax > mpm_threads) {
             worker->hmax = mpm_threads;
         }
-        if (worker->smax == 0 || worker->smax > worker->hmax) {
+        if (worker->smax == -1 || worker->smax > worker->hmax) {
             worker->smax = worker->hmax;
         }
         /* Set min to be lower then smax */