]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r683626, r685112 from trunk:
authorJim Jagielski <jim@apache.org>
Fri, 15 Aug 2008 22:12:47 +0000 (22:12 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 15 Aug 2008 22:12:47 +0000 (22:12 +0000)
mod_dav_fs: Retrieve minimal system information about directory
entries when walking a DAV fs, resolving a performance degradation on
Windows.

PR: 45464

* modules/dav/fs/repos.c (DAV_FINFO_MASK): Define macro.
  (dav_fs_walker): Use DAV_FINFO_MASK when stat'ing the
  directory member during the walk.

Reviewed by: jim

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

CHANGES
modules/dav/fs/repos.c

diff --git a/CHANGES b/CHANGES
index b43bbd0faeff0a5812f9d7cde8d397fde508890e..bd0308e3a4f2b682f102fb810bcb7a84ec383d59 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,15 @@ Changes with Apache 2.2.10
      mod_proxy_ftp: Prevent XSS attacks when using wildcards in the path of
      the FTP URL. Discovered by Marc Bevand of Rapid7. [Ruediger Pluem]
 
+  *) mod_dav_fs: Retrieve minimal system information about directory
+     entries when walking a DAV fs, resolving a performance degradation on
+     Windows.  PR 45464.  [Jeff Trawick]
+
+  *) mod_cgid: Pass along empty command line arguments from an ISINDEX
+     query that has consecutive '+' characters in the QUERY_STRING,
+     matching the behavior of mod_cgi.
+     [Eric Covener]
+
   *) mod_headers: Prevent Header edit from processing only the first header
      of possibly multiple headers with the same name and deleting the
      remaining ones. PR 45333.  [Ruediger Pluem]
index a532e6e94fa723d9359c9d66f7d4f1b1362b0091..bb1978815b0ee37f7f8f3e7b52c77e5f8f2a5a06 100644 (file)
@@ -119,9 +119,19 @@ enum {
 ** Does this platform support an executable flag?
 **
 ** ### need a way to portably abstract this query
+**
+** DAV_FINFO_MASK gives the appropriate mask to use for the stat call
+** used to get file attributes.
 */
 #ifndef WIN32
 #define DAV_FS_HAS_EXECUTABLE
+#define DAV_FINFO_MASK (APR_FINFO_LINK | APR_FINFO_TYPE | APR_FINFO_INODE | \
+                        APR_FINFO_SIZE | APR_FINFO_CTIME | APR_FINFO_MTIME | \
+                        APR_FINFO_PROT)
+#else
+/* as above, but without APR_FINFO_PROT */
+#define DAV_FINFO_MASK (APR_FINFO_LINK | APR_FINFO_TYPE | APR_FINFO_INODE | \
+                        APR_FINFO_SIZE | APR_FINFO_CTIME | APR_FINFO_MTIME)
 #endif
 
 /*
@@ -1479,10 +1489,8 @@ static dav_error * dav_fs_walker(dav_fs_walker_context *fsctx, int depth)
         /* append this file onto the path buffer (copy null term) */
         dav_buffer_place_mem(pool, &fsctx->path1, dirent.name, len + 1, 0);
 
-
-        /* ### Optimize me, dirent can give us what we need! */
         status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf,
-                          APR_FINFO_NORM | APR_FINFO_LINK, pool);
+                          DAV_FINFO_MASK, pool);
         if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
             /* woah! where'd it go? */
             /* ### should have a better error here */