quote output, render GET

This commit is contained in:
meejah 2019-10-13 04:11:24 -06:00
parent e894795898
commit 8268f764aa
2 changed files with 5 additions and 3 deletions

View File

@ -152,10 +152,12 @@ class FileNodeHandler(Resource, ReplaceMeMixin, object):
if should_create_intermediate_directories(req):
raise WebError(
u"Cannot create directory {}, because its "
u"parent is a file, not a directory".format(name)
u"parent is a file, not a directory".format(
quote_output(name, encoding='utf-8')
)
)
raise WebError(
"Files have no children named {}".format(
u"Files have no children named {}".format(
quote_output(name, encoding='utf-8'),
)
)

View File

@ -166,7 +166,7 @@ class FileHandler(resource.Resource, object):
raise WebError("'%s' is not a file-cap" % name)
return filenode.FileNodeDownloadHandler(self.client, node)
def renderHTTP(self, ctx):
def render_GET(self, ctx):
raise WebError("/file must be followed by a file-cap and a name",
http.NOT_FOUND)