Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 86120 invoked from network); 4 Sep 2007 11:40:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Sep 2007 11:40:21 -0000 Received: (qmail 27252 invoked by uid 500); 4 Sep 2007 11:40:15 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 27204 invoked by uid 500); 4 Sep 2007 11:40:15 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 27193 invoked by uid 99); 4 Sep 2007 11:40:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 04:40:15 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 11:40:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CEC491A9832; Tue, 4 Sep 2007 04:39:59 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r572628 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/mod_mem_cache.xml modules/cache/mod_mem_cache.c Date: Tue, 04 Sep 2007 11:39:59 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070904113959.CEC491A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jim Date: Tue Sep 4 04:39:58 2007 New Revision: 572628 URL: http://svn.apache.org/viewvc?rev=572628&view=rev Log: Merge r469895 from trunk: * Increase the minimum and default value for MCacheMinObjectSize from 0 to 1, as a MCacheMinObjectSize of 0 does not make sense and leads to a signal Floating point exception (8) (division by zero) in memcache_gdsf_algorithm. PR: 40576 Submitted by: Xuekun Hu Reviewed by: rpluem Submitted by: rpluem Reviewed by: jim Modified: httpd/httpd/branches/2.2.x/CHANGES httpd/httpd/branches/2.2.x/STATUS httpd/httpd/branches/2.2.x/docs/manual/mod/mod_mem_cache.xml httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c Modified: httpd/httpd/branches/2.2.x/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=572628&r1=572627&r2=572628&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original) +++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Tue Sep 4 04:39:58 2007 @@ -1,6 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.6 + *) mod_mem_cache: Increase the minimum and default value for + MCacheMinObjectSize from 0 to 1, as a MCacheMinObjectSize of 0 does not + make sense and leads to a division by zero. PR 40576. + [Xuekun Hu ] + *) mod_cache: Remove expired content from cache that cannot be revalidated. PR 30370. [Ruediger Pluem] Modified: httpd/httpd/branches/2.2.x/STATUS URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=572628&r1=572627&r2=572628&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/STATUS (original) +++ httpd/httpd/branches/2.2.x/STATUS Tue Sep 4 04:39:58 2007 @@ -80,16 +80,6 @@ [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_mem_cache: Increase the minimum and default value for - MCacheMinObjectSize from 0 to 1, as a MCacheMinObjectSize of 0 does - not make sense and leads to a signal Floating point exception (8) - (division by zero) in memcache_gdsf_algorithm. PR 40576. - Trunk version of patch: - http://svn.apache.org/viewcvs.cgi?rev=469895&view=rev - Backport version for 2.2.x of patch: - Trunk version of patch works - +1: rpluem, fielding, jim - * mod_ssl: Fix spurious hostname-mismatch warning for valid wildcard certs. PR 37911. Trunk version of patch: Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_mem_cache.xml URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_mem_cache.xml?rev=572628&r1=572627&r2=572628&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_mem_cache.xml (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_mem_cache.xml Tue Sep 4 04:39:58 2007 @@ -106,7 +106,7 @@ The minimum size (in bytes) of a document to be allowed in the cache MCacheMinObjectSize bytes -MCacheMinObjectSize 0 +MCacheMinObjectSize 1 server config Modified: httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c?rev=572628&r1=572627&r2=572628&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c (original) +++ httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c Tue Sep 4 04:39:58 2007 @@ -92,7 +92,7 @@ static mem_cache_conf *sconf; #define DEFAULT_MAX_CACHE_SIZE 100*1024 -#define DEFAULT_MIN_CACHE_OBJECT_SIZE 0 +#define DEFAULT_MIN_CACHE_OBJECT_SIZE 1 #define DEFAULT_MAX_CACHE_OBJECT_SIZE 10000 #define DEFAULT_MAX_OBJECT_CNT 1009 #define DEFAULT_MAX_STREAMING_BUFFER_SIZE 100000 @@ -879,9 +879,12 @@ apr_size_t val; if (sscanf(arg, "%" APR_SIZE_T_FMT, &val) != 1) { - return "MCacheMinObjectSize value must be an integer (bytes)"; + return "MCacheMinObjectSize value must be an positive integer (bytes)"; } - sconf->min_cache_object_size = val; + if (val > 0) + sconf->min_cache_object_size = val; + else + return "MCacheMinObjectSize value must be an positive integer (bytes)"; return NULL; } static const char