From 021a9e370fb7c3993d7ca06ba748228612a5b45b Mon Sep 17 00:00:00 2001 From: robk-tahoe Date: Wed, 11 Jun 2008 12:46:28 -0700 Subject: [PATCH] webish: fix directory url redirection when rendering a directory in webish, if the url did not correctly include a trailing slash '/' then the browser will be redirected to a url which does. this causes any relative links (e.g. the 'other representations' which are links to files relative to the current directory) to be correctly intrpreted as relative to the directory in question by the browser. uses twisted's addSlash mechanism, which is designed for this purpose :-) --- src/allmydata/web/directory.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/allmydata/web/directory.py b/src/allmydata/web/directory.py index d9273e07..5fe2db63 100644 --- a/src/allmydata/web/directory.py +++ b/src/allmydata/web/directory.py @@ -367,6 +367,7 @@ class DirectoryAsHTML(rend.Page): # The remainder of this class is to render the directory into # human+browser -oriented HTML. docFactory = getxmlfile("directory.xhtml") + addSlash = True def __init__(self, node): rend.Page.__init__(self) -- 2.45.2