mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 15:16:41 +00:00
empty-string, not None
This commit is contained in:
parent
733b7932ce
commit
3c332fec2a
@ -103,9 +103,9 @@ class DirectoryNodeHandler(ReplaceMeMixin, Resource, object):
|
||||
name = name.decode('utf8')
|
||||
if not name:
|
||||
# replicating Nevow behavior that complains about "empty
|
||||
# path segments" .. but twisted.web sends in "name=None"
|
||||
# path segments" .. but twisted.web sends in "name=''"
|
||||
# for a URL like "/foo/bar/" as well as "/foo//bar"
|
||||
# (i.e. a trailing slash means "name=None" as well)
|
||||
# (i.e. a trailing slash means "name=''" as well)
|
||||
if b'//' in req.path:
|
||||
raise EmptyPathnameComponentError(
|
||||
u"The webapi does not allow empty pathname components, i.e. a double slash",
|
||||
|
Loading…
Reference in New Issue
Block a user