addSlash isn't a thing in twisted.web

This commit is contained in:
meejah 2019-09-24 13:55:40 -06:00
parent a29f1bec9d
commit 98005bab1f
2 changed files with 1 additions and 2 deletions

View File

@ -101,7 +101,7 @@ def parse_offset_arg(offset):
def get_root(ctx_or_req):
req = IRequest(ctx_or_req)
# the addSlash=True gives us one extra (empty) segment
depth = len(req.prepath) + len(req.postpath) - 1
depth = len(req.prepath) + len(req.postpath)
link = "/".join([".."] * depth)
return link

View File

@ -91,7 +91,6 @@ def make_handler_for(node, client, parentnode=None, name=None):
# support ?t=json but I don't know that all the variants already *did*
# support that..
class DirectoryNodeHandler(ReplaceMeMixin, Resource, object):
addSlash = True
def __init__(self, client, node, parentnode=None, name=None):
super(DirectoryNodeHandler, self).__init__()