From 6979cfa205ee13da0358dd92d0971d78c09ffefc Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 19 Jan 2021 14:28:00 -0500 Subject: [PATCH] Fix the redirect 'str has no render' bug. --- src/allmydata/web/root.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allmydata/web/root.py b/src/allmydata/web/root.py index 0ef6b00d2..2e82e94ec 100644 --- a/src/allmydata/web/root.py +++ b/src/allmydata/web/root.py @@ -11,7 +11,7 @@ from twisted.web import ( resource, static, ) -from twisted.web.util import redirectTo +from twisted.web.util import redirectTo, Redirect from twisted.python.filepath import FilePath from twisted.web.template import ( Element, @@ -155,7 +155,7 @@ class URIHandler(resource.Resource, object): u = u.replace( path=(s for s in u.path if s), # remove empty segments ) - return redirectTo(u.to_uri().to_text().encode('utf8'), req) + return Redirect(u.to_uri().to_text().encode('utf8')) try: node = self.client.create_node_from_uri(name) return directory.make_handler_for(node, self.client)