Simple directory listing within a Callback

Hi,

within a callback, I’m calling a file that contains an iframe that
should display a directory listing. The directory has its +Indexes in
httpd.conf but doesn’t get displayed, instead I get a 404 and the
following error message in my apache error.log:

[error] [Mason] File does not
exist: /var/www/htdocs/rt/html/foo/bar/index.html/

So it seems that the mason handler wants to call a file index.html
instead of just display the content of the directory ‘bar’. I tried to
set a default handler for that location in my httpd.conf but the mason
error remains.

Is there any possibility to tell mason not to search for a index.html
for that specific directory or can I disable mason for the directory or
is there any other way to display files (contained in a directory)
inside of RT?

Thanks for any hint or something :slight_smile:

CU
David

David Elze Tel: (+49)(0)441 - 36116410
elze@bytemine.net Fax: (+49)(0)441 - 36116419
http://www.bytemine.net/ PGP/GPG: 5F83FEA2
bytemine - Entwicklungsmanufaktur fuer innovative Loesungen

signature.asc (191 Bytes)

Hi,

within a callback, I’m calling a file that contains an iframe that
should display a directory listing. The directory has its +Indexes in
httpd.conf but doesn’t get displayed, instead I get a 404 and the
following error message in my apache error.log:

[error] [Mason] File does not
exist: /var/www/htdocs/rt/html/foo/bar/index.html/

So it seems that the mason handler wants to call a file index.html
instead of just display the content of the directory ‘bar’. I tried to
set a default handler for that location in my httpd.conf but the mason
error remains.

Is there any possibility to tell mason not to search for a index.html
for that specific directory or can I disable mason for the directory or
is there any other way to display files (contained in a directory)
inside of RT?

Thanks for any hint or something :slight_smile:

Directory indexes are for when a directory is requested
from the server. They also return an entire HTML page.

What you want (and probably exists somewhere in the
Mason community) is a component that takes a directory
as an argument and produces the listing for you.

It would look something like this:

% for my $entry ( @ls ) {
<% $entry %>
% }
<%INIT>
open(DIR, $dir);
my @ls = readdir DIR:
close DIR;
</%INIT>
<%ARGS>
$dir
</%ARGS>

And you would call it like this:

<& MyComponent, dir => ‘foo/bar’ &>

-Todd