]> granicus.if.org Git - apache/commitdiff
Add APR_FOPEN_BINARY to the options passed to apr for opening the
authorColm MacCarthaigh <colm@apache.org>
Tue, 23 Aug 2005 17:03:01 +0000 (17:03 +0000)
committerColm MacCarthaigh <colm@apache.org>
Tue, 23 Aug 2005 17:03:01 +0000 (17:03 +0000)
cache header files.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239436 13f79535-47bb-0310-9956-ffa450edef68

support/htcacheclean.c

index 15fd29bf1de52b4e67d4cf04572668c2d3295274..bfdba1c9971ee7c68602e49a4c8745e7fbce7661 100644 (file)
@@ -449,8 +449,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) {
@@ -522,8 +522,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) {