httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/modules/generators mod_autoindex.c
Date Thu, 21 Nov 2002 23:53:21 GMT
trawick     2002/11/21 15:53:21

  Modified:    .        CHANGES
               modules/generators mod_autoindex.c
  Log:
  mod_autoindex: AddDescription directives for directories
  now work as in Apache 1.3, where no trailing '/' is
  specified on the directory name.  Previously, the trailing
  '/' *had* to be specified, which was incompatible with
  Apache 1.3.
  
  PR:       7990
  
  Revision  Changes    Path
  1.988     +6 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.987
  retrieving revision 1.988
  diff -u -r1.987 -r1.988
  --- CHANGES	21 Nov 2002 21:52:46 -0000	1.987
  +++ CHANGES	21 Nov 2002 23:53:20 -0000	1.988
  @@ -1,5 +1,11 @@
   Changes with Apache 2.0.44
   
  +  *) mod_autoindex: AddDescription directives for directories
  +     now work as in Apache 1.3, where no trailing '/' is
  +     specified on the directory name.  Previously, the trailing
  +     '/' *had* to be specified, which was incompatible with
  +     Apache 1.3.  PR 7990  [Jeff Trawick]
  +
     *) Fix for PR 14556. The expiry calculations in mod_cache were
        trying to perform "now + ((date - lastmod) * factor)" where
        date == lastmod resulting in "now + 0". The code now follows
  
  
  
  1.112     +8 -0      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.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- mod_autoindex.c	9 Oct 2002 09:50:09 -0000	1.111
  +++ mod_autoindex.c	21 Nov 2002 23:53:21 -0000	1.112
  @@ -1321,6 +1321,14 @@
           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);
  
  
  

Mime
View raw message