[Xitami] Emulating Apache directories

Ewen McNeill xitami@lists.xitami.org
Mon, 10 Dec 2001 19:24:24 +1300


In message <3C10A69D.20200@freesbee.fr>, Francis Turner writes:
>One useful thing that you can do in Apache is display a README file at 
>the bottom of a directory listing. I tried to do the same thing using 
>GSL in xitami and it works most of the time (code below). Where it 
>doesn't work is where the directory is an alias to somewhere.  [Because
>have to guess what the directory path on disk was]

Well spotted.  This is a bug (as far as I'm concerned), and I've added
it to our bug list.

You are right that smthttpl.c:http_list_directory() is what is creating
the directory (as an XML tree).  One of the things that it should also
add to the XML is the path to the actual directory on disk, since it
obviously needs to know this while it is preparing the list of files,
and it would be useful to the GSL script outputting the directory.  The
directory path is, I think, in p_http-> file_name, so adding an
attribute with that value into the top level of the XML would be useful,
called perhaps "path_on_disk".

Ewen

-- 
Ewen McNeill, Technical Consultant, iMatix Corporation  www.imatix.com