]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport two small htcacheclean fixes from trunk to the 2.2.x branch;
authorColm MacCarthaigh <colm@apache.org>
Sun, 18 Sep 2005 21:17:54 +0000 (21:17 +0000)
committerColm MacCarthaigh <colm@apache.org>
Sun, 18 Sep 2005 21:17:54 +0000 (21:17 +0000)
    1.) Open the cache files as binary types, so that htcacheclean can
        work properly on Windows.

    2.) Add an entry in support/README for htcacheclean

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

support/README
support/htcacheclean.c

index 80e9cafde0a20d4ce61257b34c76bc476ccdf53b..020a6bcfcda455db37e776c45173b842aca5609c 100644 (file)
@@ -17,6 +17,9 @@ dbmmanage
        Create and update user authentication files in the faster
        DBM format used by mod_auth_db.
 
+htcacheclean
+    Keep the size of mod_disk_cache store within a certain limit.
+
 htdigest
        Create and update user authentication files used in
        DIGEST authentification. See mod_auth_digest.
index 6fa1842ca49d01d9f02f980e4a1a55f67f35cf2a..622963e99d9601f75e1e985021131751a47779c4 100644 (file)
@@ -497,8 +497,8 @@ static int process_dir(char *path, apr_pool_t *pool)
         case HEADERDATA:
             nextpath = apr_pstrcat(p, path, "/", d->basename,
                                    CACHE_HEADER_SUFFIX, NULL);
-            if (apr_file_open(&fd, nextpath, APR_READ, APR_OS_DEFAULT,
-                              p) == APR_SUCCESS) {
+            if (apr_file_open(&fd, nextpath, APR_FOPEN_READ | APR_FOPEN_BINARY, 
+                              APR_OS_DEFAULT, p) == APR_SUCCESS) {
                 len = sizeof(format);
                 if (apr_file_read_full(fd, &format, len, 
                                        &len) == APR_SUCCESS) {
@@ -570,8 +570,8 @@ static int process_dir(char *path, apr_pool_t *pool)
             current = apr_time_now();
             nextpath = apr_pstrcat(p, path, "/", d->basename,
                                    CACHE_HEADER_SUFFIX, NULL);
-            if (apr_file_open(&fd, nextpath, APR_READ, APR_OS_DEFAULT,
-                              p) == APR_SUCCESS) {
+            if (apr_file_open(&fd, nextpath, APR_FOPEN_READ | APR_FOPEN_BINARY, 
+                              APR_OS_DEFAULT, p) == APR_SUCCESS) {
                 len = sizeof(format);
                 if (apr_file_read_full(fd, &format, len, 
                                        &len) == APR_SUCCESS) {