You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2005/08/23 19:03:03 UTC
svn commit: r239436 - /httpd/httpd/trunk/support/htcacheclean.c
Author: colm
Date: Tue Aug 23 10:03:01 2005
New Revision: 239436
URL: http://svn.apache.org/viewcvs?rev=239436&view=rev
Log:
Add APR_FOPEN_BINARY to the options passed to apr for opening the
cache header files.
Modified:
httpd/httpd/trunk/support/htcacheclean.c
Modified: httpd/httpd/trunk/support/htcacheclean.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/support/htcacheclean.c?rev=239436&r1=239435&r2=239436&view=diff
==============================================================================
--- httpd/httpd/trunk/support/htcacheclean.c (original)
+++ httpd/httpd/trunk/support/htcacheclean.c Tue Aug 23 10:03:01 2005
@@ -449,8 +449,8 @@
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 @@
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) {
Re: svn commit: r239436 - /httpd/httpd/trunk/support/htcacheclean.c
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On August 23, 2005 8:18:44 PM +0100 Colm MacCarthaigh <co...@stdlib.net>
wrote:
> Because mod_disk_cache uses;
>
> APR_CREATE | APR_WRITE | APR_BINARY | APR_EXCL
>
> when creating them, see inside store_headers at mod_disk_cache.c:892
It would have been helpful if you had noted that in the log message.
> I'm trying to get htcacheclean working on Win32, where it matters :-)
Ha! ;-) -- justin
Re: svn commit: r239436 - /httpd/httpd/trunk/support/htcacheclean.c
Posted by Colm MacCarthaigh <co...@stdlib.net>.
On Tue, Aug 23, 2005 at 12:05:13PM -0700, Justin Erenkrantz wrote:
> --On August 23, 2005 5:03:03 PM +0000 colm@apache.org wrote:
>
> >Add APR_FOPEN_BINARY to the options passed to apr for opening the
> >cache header files.
>
> Why?
Because mod_disk_cache uses;
APR_CREATE | APR_WRITE | APR_BINARY | APR_EXCL
when creating them, see inside store_headers at mod_disk_cache.c:892
I'm trying to get htcacheclean working on Win32, where it matters :-)
--
Colm MacCárthaigh Public Key: colm+pgp@stdlib.net
Re: svn commit: r239436 - /httpd/httpd/trunk/support/htcacheclean.c
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On August 23, 2005 5:03:03 PM +0000 colm@apache.org wrote:
> Add APR_FOPEN_BINARY to the options passed to apr for opening the
> cache header files.
Why? -- justin