httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Singly Bertrand de \(X1995\)">
Subject mod_autoindex, link to the "parent directory" (fwd)
Date Mon, 20 Jul 1998 18:01:18 GMT
when displaying which is
a directory without any index file mod_autoindex produces a list where the
parent directory is referenced as "/htdig/" (the webserver running apache
is and so it doesn't work (should be a href
to "/eleves/htdig/")

it seems to me that any browser can handle an href to "../" (is it true?)
then mod_autoindex could be simplified :
        if (is_parent(ar[x]->name)) {
            t = ap_make_full_path(scratch, name, "../");
            if (t[0] == '\0') {
                t = "/";
            anchor = ap_pstrcat(scratch, "<A HREF=\"",
                                "\">", NULL);

>> anchor = ap_pstrcat(scratch, "<a href=\"../\">", NULL);

            t2 = "Parent Directory</A>       ";

if I'm wrong, Apache makes the assumption (I posted
several months ago without any response in
comp.infosystems.www.servers.unix) in mod_autoindex, mod_speling
(multiple choices) that an href
to "/" is an href to the web server, not true in all cases
the problem is that ServerName checks for a valid DNS entry and
denies a string like "" 

any idea?


Bertrand de Singly

View raw message