Re: Apache::AutoIndex patch
By the way, there exists one difference between mod_autoindex and Apache::Autoindex in DirectoryIndex option. I should write DirectoryIndex "index.html index.htm index.shtml index.phtml index.pl" for Apache::Autoindex and the same but without quotes for mod_autoindex. If I omit quotes Apache::Autoindex handles only the first name and ignores others. Does anybody know where is the problem? Apache? mod_perl? Module? -- ab ICQ: 3959207
Re: Apache::AutoIndex patch
Ken Williams [EMAIL PROTECTED] writes: [EMAIL PROTECTED] (Alexei V. Barantsev) wrote: Dear modperlers! I have found that Apache::Autoindex dos not like filenames with special characters (like space or ?). Such a name should be uri-escaped. See patch below. This patch is backwards, it should be done the other way around. '+' should be next to the new lines. Sorry! I was dumb. (19:25:34) $ diff -u AutoIndex.pm-orig AutoIndex.pm --- AutoIndex.pm-orig Tue Jun 29 21:10:35 1999 +++ AutoIndex.pmThu May 11 12:05:39 2000 @@ -4,7 +4,7 @@ use strict; use Apache::Constants qw(:common OPT_INDEXES DECLINE_CMD REDIRECT DIR_MAGIC_TYPE); use DynaLoader (); -use Apache::Util qw(ht_time size_string); +use Apache::Util qw(ht_time size_string escape_uri); use Apache::ModuleConfig; use Apache::Icon; use Apache::Language; @@ -149,7 +149,7 @@ if (not $cfg-{options} FANCY_INDEXING){ print "UL\n"; foreach my $file ( readdir DH ){ -print "\tLIA HREF=\"$file\"$file/A/LI\n"; +print "\tLIA HREF=\"".escape_uri($file)."\"$file/A/LI\n"; } print "/UL/BODY/HTML\n"; return OK; @@ -221,7 +221,7 @@ #Icon print "TD"; if ($cfg-{options} ICONS_ARE_LINKS) { -print "TDa href=\"$entry"; +print "TDa href=\"".escape_uri($entry); print "/" if $list-{$entry}{sizenice} eq '-'; print "\""; } @@ -230,7 +230,7 @@ print "/TD"; #Name -print "TDa href=\"$entry"; +print "TDa href=\"".escape_uri($entry); print "/" if $list-{$entry}{sizenice} eq '-'; print "\"$label/a/TD"; -- ab ICQ: 3959207
Re: Apache::AutoIndex patch
"Alexei V. Barantsev" wrote: w trillich [EMAIL PROTECTED] writes: speaking of autoindex issues-- i can't get apache to display the HEADER or README files (above and below the tabular file listing), and when i posted my most recent question, someone else piped up and said they've got the same snag. I have both and all works right, options HeaderName and ReadmeName really set names of these files. Moreover, I use Apache::Autoindex with Apache::OutputChain to apply CSS to the directory index. MUCHO thanks for that tip! delightful! (i knew it must be possible--thanks!) From my /server-status Module Name: Apache::AutoIndexContent handlers: none aha--that's a perl gasdget, n'est-ce que pas? i'm using the standard mod_autoindex.c (see below). Configuration Phase Participation: Create Directory Config, Create Server Config Request Phase Participation: none Module Directives: IndexIgnore - a list of file names DirectoryIndex - one or more file extensions HeaderName - a list of file names ReadmeName - a list of file names FancyIndexing - Limited to on or off (superseded by IndexOptions FancyIndexing) IndexOrderDefault - {Ascending,Descending} {Name,Size,Description,Date} AddDescription - Descriptive text followed by one or more filenames IndexOptions - one or more index options Current Configuration: httpd.conf DirectoryIndex "index.html index.htm index.shtml index.phtml index.mhtml index.pl index.php3" IndexOptions FancyIndexing ScanHTMLTitles ReadmeName README HeaderName HEADER IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t mine's still broke... here's my /server-status Server Version: Apache/1.3.9 [snip] Module Name: mod_autoindex.c Content handlers: httpd/unix-directory Configuration Phase Participation: Create Directory Config, Merge Directory Configs Request Phase Participation: none [snip] IndexOptions IconsAreLinks FancyIndexing ReadmeName README HeaderName HEADER IndexIgnore .??* *~ *# HEADER* README* RCS