Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 38407 invoked from network); 3 Nov 2003 21:57:53 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 Nov 2003 21:57:53 -0000 Received: (qmail 75771 invoked by uid 500); 3 Nov 2003 21:57:41 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 75638 invoked by uid 500); 3 Nov 2003 21:57:40 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 75624 invoked by uid 500); 3 Nov 2003 21:57:40 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Received: (qmail 75621 invoked from network); 3 Nov 2003 21:57:40 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 3 Nov 2003 21:57:40 -0000 Received: (qmail 38357 invoked by uid 1569); 3 Nov 2003 21:57:52 -0000 Date: 3 Nov 2003 21:57:52 -0000 Message-ID: <20031103215752.38356.qmail@minotaur.apache.org> From: nd@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/generators mod_autoindex.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 , 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^^"); }