httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jayaram A <jaya...@wipinfo.soft.net>
Subject [PATCH] for indexing problem in 1.3.9 mod_autoindex module.
Date Wed, 27 Oct 1999 08:58:10 GMT
Hello All,

Please comment on the below fixes for 2 problems in mod_autoindex module.

-----------------------------------------------------------------------

mod_autoindex Problem 1:
------------------------

AddIcon (<alttext>,<icon>) ^^DIRECTORY^^ 
and 
AddIcon (<alttext>,<icon>) ^^BLANKICON^^ 
should be able to set the alternate text and icon file for any directory/
blankicon in a directory listing. This was not happening because the
alternate text for ^^DIRECTORY^^ and ^^BLANKICON^^ were hardcoded to 
"DIR" and "   " respectively.

For example:

I have done the following setup:

Ran the following 2 commands:

/bin/rm -f <DocumentRoot>/index/testdir
mkdir -p <DocumentRoot>/index/testdir

added the following 2 lines to httpd.conf:

IndexOptions FancyIndexing
AddIcon (alt_txt_for_dir,/icons/folder.gif) ^^DIRECTORY^^

and sent the following HTTP request to the apache HTTP server:

GET /index/ HTTP/1.1
Host: <some_host>
<CRLF>

Now, with  1.3.9 apache, it is observed that the HTML tag entry for 
the directory (that is created, namely "testdir") looks as follows:

<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="testdir/">testdir/</A>

where as it should ideally be:

<IMG SRC="/icons/folder.gif" ALT="[alt_txt_for_dir]"> <A HREF="testdir/">testdir/</A>


mod_autoindex Problem 2:
-------------------------

IndexIgnore <file-extension> should hide the files with this file-
extension in directory listings. This was NOT happening because the 
total filename was being compared with the file-extension.


For example:

I have done the following setup:

Ran the following 2 commands:

/bin/rm -rf <DocumentRoot>/index/
mkdir -p <DocumentRoot>/index/
touch <DocumentRoot>/index/textfile.txt
touch <DocumentRoot>/index/testfile.html

added the following line to httpd.conf:

IndexIgnore .txt

and sent the following HTTP request to the apache HTTP server:

GET /index/ HTTP/1.1
Host: <some_host>
<CRLF>

Now, with 1.3.9 apache, it is observed that the generated HTML file
also lists the textfile.txt as below: 

<A HREF="textfile.txt">textfile.txt</A>

where as it is not exepected to list testfile.txt.

The attachment listing the fix for the above problems: mod_autoindex.c.diffs

(diff -C 3 apache_1.3.9/src/modules/standard/mod_autoindex.c.org  \
           apache_1.3.9/src/modules/standard/mod_autoindex.c.new)

--------------------------------------------------------------------------

Thanks and Regards,
Jayaram.

Mime
View raw message