]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
merge this from 2.1-dev:
authorJeff Trawick <trawick@apache.org>
Thu, 4 Dec 2003 06:40:13 +0000 (06:40 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 4 Dec 2003 06:40:13 +0000 (06:40 +0000)
   Restore the ability to add a description for directories that
   don't contain an index file.  (Broken in 2.0.48)

Submitted by: nd
Reviewed by: trawick, striker

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

CHANGES
STATUS
modules/generators/mod_autoindex.c

diff --git a/CHANGES b/CHANGES
index 6ca5633b403d426a1f30ea2ec9d5305e30bf910a..5a0eef55abc4e5d57cbcbc268e9f9b10057aef5b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.49
 
+  *) Restore the ability to add a description for directories that
+     don't contain an index file.  (Broken in 2.0.48) [AndrĂ© Malo]
+
   *) Fix a problem with the display of empty variables ("SetEnv foo") in
      mod_include.  PR 24734  [Markus Julen <mj zermatt.net>]
 
diff --git a/STATUS b/STATUS
index b2b5b286d8844f4f0c304384be0aab8d15a790b4..34d93d451dcc1f4c8924efb1455db008dba91d4a 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2003/12/04 06:31:01 $]
+Last modified at [$Date: 2003/12/04 06:40:13 $]
 
 Release:
 
@@ -338,12 +338,6 @@ PATCHES TO BACKPORT FROM 2.1
         include/ap_mmn.h: r1.60
       +1: nd
 
-    * mod_autoindex: Restore the ability to add a description for
-      directories that don't contain an index file.
-      PR 7990
-        modules/generators/mod_autoindex.c: r1.125
-      +1: nd, trawick, striker
-
     * LDAP cache fixes from Matthieu Estrade; see PR 18756
         include/util_ldap.h r1.12
         modules/experimental/util_ldap.c r1.15, r1.16
index 9aa3967927c854ceb6e0d9c44850d998292146a8..02b2958602e42422864663ca64f534643a66dd0d 100644 (file)
@@ -1329,14 +1329,6 @@ static struct ent *make_autoindex_entry(const apr_finfo_t *dirent,
         return (NULL);
     }
 
-    if (rr->finfo.filetype == APR_DIR) {
-        /* ap_sub_req_lookup_dirent() adds '/' to end of any directory,
-         * but that messes up our attempt to find relevant
-         * AddDescription directives.
-         */
-        rr->filename[strlen(rr->filename) - 1] = '\0';
-    }
-
     p = (struct ent *) apr_pcalloc(r->pool, sizeof(struct ent));
     if (dirent->filetype == APR_DIR) {
         p->name = apr_pstrcat(r->pool, dirent->name, "/", NULL);
@@ -1362,6 +1354,10 @@ static struct ent *make_autoindex_entry(const apr_finfo_t *dirent,
                 p->isdir = 1;
             }
             rr->filename = ap_make_dirstr_parent (rr->pool, rr->filename);
+
+            /* omit the trailing slash (1.3 compat) */
+            rr->filename[strlen(rr->filename) - 1] = '\0';
+
             if (!(p->icon = find_icon(d, rr, 1))) {
                 p->icon = find_default_icon(d, "^^DIRECTORY^^");
             }