httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Singly Bertrand de \(X1995\)" ...@frankiz.polytechnique.fr>
Subject mod_autoindex, link to the "parent directory" (fwd)
Date Mon, 20 Jul 1998 18:01:18 GMT
hello,
when displaying http://www.polytechnique.fr/eleves/htdig/apache/ 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 www.polytechnique.fr/eleves) 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, "../");
            ap_getparents(t);
            if (t[0] == '\0') {
                t = "/";
            }
            anchor = ap_pstrcat(scratch, "<A HREF=\"",
                                ap_escape_html(scratch,
                                               ap_os_escape_path(scratch,
t,
                                                                 0)),
                                "\">", 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 "www.polytechnique.fr/eleves" 

any idea?


Bertrand

------------------
Bertrand de Singly
mailto:bertrand.de-singly@cyberdude.com
http://www.polytechnique.fr/eleves/1995/singly/



Mime
View raw message