]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r469895 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 4 Sep 2007 11:39:58 +0000 (11:39 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 4 Sep 2007 11:39:58 +0000 (11:39 +0000)
* 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 <xuekun.hu gmail.com>
Reviewed by: rpluem

Submitted by: rpluem
Reviewed by: jim

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

CHANGES
STATUS
docs/manual/mod/mod_mem_cache.xml
modules/cache/mod_mem_cache.c

diff --git a/CHANGES b/CHANGES
index 633cd8ca4303f880a7fa5a6c0e782b85013f487c..8578e2424b19416dcbf467aeb7502b715e8cc4d2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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 <xuekun.hu gmail.com>]
+
   *) mod_cache: Remove expired content from cache that cannot be revalidated.
      PR 30370. [Ruediger Pluem]
 
diff --git a/STATUS b/STATUS
index 143049f21d94f7aeb8fe42783751dfc9387f7d89..e5342223178a07f251a3a4d9967064abc9e393b5 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -80,16 +80,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ 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:
index 616d7ad597190173330b4650e5ae76fe7bd3cb91..6f1bde48bc16408d3380b71690ffee712c3ba8a7 100644 (file)
@@ -106,7 +106,7 @@ cache</description>
 <description>The minimum size (in bytes) of a document to be allowed in the
 cache</description>
 <syntax>MCacheMinObjectSize <var>bytes</var></syntax>
-<default>MCacheMinObjectSize 0</default>
+<default>MCacheMinObjectSize 1</default>
 <contextlist><context>server config</context></contextlist>
 
 <usage>
index 589ed17a160398a693d73f4fc74ae5eea8284eef..65f35327b796858823702163cabbad1e227db9d6 100644 (file)
@@ -92,7 +92,7 @@ typedef struct {
 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 @@ static const char
     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