mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-18 10:46:24 +00:00
don't double-apply the renderer logic
since that leads to double-finishing requests too
This commit is contained in:
parent
0faa24d344
commit
31207e4b6b
@ -526,6 +526,10 @@ def render_exception(render):
|
||||
method=request.method,
|
||||
handler=fullyQualifiedName(bound_render),
|
||||
)
|
||||
if getattr(request, "dont_apply_extra_processing", False):
|
||||
with action:
|
||||
return bound_render(request)
|
||||
|
||||
with action.context():
|
||||
result = DeferredContext(maybeDeferred(bound_render, request))
|
||||
result.addBoth(_finish, bound_render, request)
|
||||
|
@ -400,7 +400,10 @@ class DirectoryNodeHandler(ReplaceMeMixin, Resource, object):
|
||||
# delegate to it. We could return the resource back out of
|
||||
# DirectoryNodeHandler.renderHTTP, and nevow would recurse into it,
|
||||
# but the addCallback() that handles when_done= would break.
|
||||
d.addCallback(lambda child: child.render(req))
|
||||
def render_child(child):
|
||||
req.dont_apply_extra_processing = True
|
||||
return child.render(req)
|
||||
d.addCallback(render_child)
|
||||
return d
|
||||
|
||||
def _POST_uri(self, req):
|
||||
|
Loading…
Reference in New Issue
Block a user