Drop RecursiveMiddleware

It isn't used AFAICT and makes 3 copies of the request environ each,
without ever being used.

Shows up in a memray trace, though this also shouldn't cause a memory
leak ...
This commit is contained in:
mvdbeek
2023-08-27 12:04:54 +02:00
parent 8d5feb4fa1
commit 73b1a48057
3 changed files with 0 additions and 17 deletions
-6
View File
@@ -1285,12 +1285,6 @@ def wrap_in_middleware(app, global_conf, application_stack, **local_conf):
normalize_remote_user_email=conf.get("normalize_remote_user_email", False),
),
)
# The recursive middleware allows for including requests in other
# requests or forwarding of requests, all on the server side.
if asbool(conf.get("use_recursive", True)):
from paste import recursive
app = wrap_if_allowed(app, stack, recursive.RecursiveMiddleware, args=(conf,))
# Error middleware
app = wrap_if_allowed(app, stack, ErrorMiddleware, args=(conf,))
-6
View File
@@ -86,12 +86,6 @@ def wrap_in_middleware(app, global_conf, application_stack, **local_conf):
# wrapped around the application (it can interact poorly with
# other middleware):
app = wrap_if_allowed(app, stack, httpexceptions.make_middleware, name="paste.httpexceptions", args=(conf,))
# The recursive middleware allows for including requests in other
# requests or forwarding of requests, all on the server side.
if asbool(conf.get("use_recursive", True)):
from paste import recursive
app = wrap_if_allowed(app, stack, recursive.RecursiveMiddleware, args=(conf,))
# Error middleware
app = wrap_if_allowed(app, stack, ErrorMiddleware, args=(conf,))
-5
View File
@@ -259,12 +259,7 @@ def wrap_in_middleware(app, global_conf, application_stack, **local_conf):
normalize_remote_user_email=conf.get("normalize_remote_user_email", False),
),
)
# The recursive middleware allows for including requests in other
# requests or forwarding of requests, all on the server side.
if asbool(conf.get("use_recursive", True)):
from paste import recursive
app = wrap_if_allowed(app, stack, recursive.RecursiveMiddleware, args=(conf,))
# Transaction logging (apache access.log style)
if asbool(conf.get("use_translogger", True)):
from paste.translogger import TransLogger