From: Jim Jagielski Date: Tue, 7 Oct 2008 14:59:48 +0000 (+0000) Subject: Allow smax to be 0 X-Git-Tag: 2.2.10~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c41bc3d750d725ff581a64bcebea0e80d069938;p=thirdparty%2Fapache%2Fhttpd.git Allow smax to be 0 PR 43371 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@702502 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index f5a43bc4a99..24e736d127a 100644 --- 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 , + 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 ] diff --git a/STATUS b/STATUS index 1369e4b8335..1115a3b165a 100644 --- 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 ] diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 15e7e8ef80a..7aaa7da7af3 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -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) diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 028bd1abc79..194dbb1d7ee 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -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 */