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.

Best wishes,
Alexei.

(12:05:45) $ diff -u AutoIndex.pm AutoIndex.pm-orig 
--- AutoIndex.pm        Thu May 11 12:05:39 2000
+++ AutoIndex.pm-orig   Tue Jun 29 21:10:35 1999
@@ -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 escape_uri);
+use Apache::Util qw(ht_time size_string);
 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 "\t<LI><A HREF=\"".escape_uri($file)."\">$file</A></LI>\n";
+            print "\t<LI><A HREF=\"$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 "<TD><a href=\"".escape_uri($entry);
+            print "<TD><a href=\"$entry";
                print "/" if $list->{$entry}{sizenice} eq '-';
                print "\">";
             }
@@ -230,7 +230,7 @@
         print "</TD>";
         
         #Name
-        print "<TD><a href=\"".escape_uri($entry);
+        print "<TD><a href=\"$entry";
            print "/" if $list->{$entry}{sizenice} eq '-';
            print "\">$label</a></TD>";
 

Reply via email to