You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/10/03 15:11:25 UTC
cvs commit: apache-2.0/src/modules/standard mod_file_cache.c
wrowe 00/10/03 06:11:25
Modified: src/modules/standard mod_file_cache.c
Log:
Definately need a canonical name, so comparison succeeds at run time.
Revision Changes Path
1.25 +5 -3 apache-2.0/src/modules/standard/mod_file_cache.c
Index: mod_file_cache.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_file_cache.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- mod_file_cache.c 2000/08/15 12:54:08 1.24
+++ mod_file_cache.c 2000/10/03 13:11:25 1.25
@@ -273,8 +273,10 @@
a_file *new_file;
a_file tmp;
apr_file_t *fd = NULL;
+ char *fspec;
- if (apr_stat(&tmp.finfo, filename, cmd->temp_pool) != APR_SUCCESS) {
+ fspec = ap_os_case_canonical_filename(cmd->pool, filename);
+ if (apr_stat(&tmp.finfo, fspec, cmd->temp_pool) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, cmd->server,
"mod_file_cache: unable to stat(%s), skipping", filename);
return NULL;
@@ -284,7 +286,7 @@
"mod_file_cache: %s isn't a regular file, skipping", filename);
return NULL;
}
- if (apr_open(&fd, filename, APR_READ, APR_OS_DEFAULT, cmd->temp_pool)
+ if (apr_open(&fd, fspec, APR_READ, APR_OS_DEFAULT, cmd->temp_pool)
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, cmd->server,
"mod_file_cache: unable to open(%s, O_RDONLY), skipping", filename);
@@ -299,7 +301,7 @@
return NULL;
}
apr_close(fd);
- tmp.filename = apr_pstrdup(cmd->pool, filename);
+ tmp.filename = fspec;
sconf = ap_get_module_config(cmd->server->module_config, &file_cache_module);
new_file = apr_push_array(sconf->files);
*new_file = tmp;