mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-15 14:46:37 +00:00
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 :-)
This commit is contained in:
parent
aec1764baf
commit
021a9e370f
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user