httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/generators mod_autoindex.c
Date Mon, 03 Nov 2003 21:57:52 GMT
nd          2003/11/03 13:57:52

  Modified:    .        CHANGES
               modules/generators mod_autoindex.c
  Log:
  darn, the patch for bug 9587 (wrong icon for directories shown) broke
  the directory descriptions more or less completely. Fix it now.
  
  Revision  Changes    Path
  1.1310    +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1309
  retrieving revision 1.1310
  diff -u -u -r1.1309 -r1.1310
  --- CHANGES	2 Nov 2003 22:09:19 -0000	1.1309
  +++ CHANGES	3 Nov 2003 21:57:51 -0000	1.1310
  @@ -2,6 +2,9 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_autoindex: Restore the ability to add a description for
  +     directories that don't contain an index file.  [André Malo]
  +
     *) mod_include no longer allows an ETag header on 304 responses.
        PR 19355. [Geoffrey Young <geoff@apache.org>, André Malo]
   
  
  
  
  1.125     +4 -8      httpd-2.0/modules/generators/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_autoindex.c,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -u -r1.124 -r1.125
  --- mod_autoindex.c	2 Nov 2003 20:37:04 -0000	1.124
  +++ mod_autoindex.c	3 Nov 2003 21:57:51 -0000	1.125
  @@ -1331,14 +1331,6 @@
           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);
  @@ -1364,6 +1356,10 @@
                   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^^");
               }
  
  
  

Mime
View raw message