summaryrefslogtreecommitdiff
path: root/swift/common/wsgi.py
diff options
context:
space:
mode:
Diffstat (limited to 'swift/common/wsgi.py')
-rw-r--r--swift/common/wsgi.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/swift/common/wsgi.py b/swift/common/wsgi.py
index 4fa4946dd..910d0051c 100644
--- a/swift/common/wsgi.py
+++ b/swift/common/wsgi.py
@@ -361,10 +361,14 @@ def loadapp(conf_file, global_conf=None, allow_modify_pipeline=True):
if func and allow_modify_pipeline:
func(PipelineWrapper(ctx))
filters = [c.create() for c in reversed(ctx.filter_contexts)]
+ pipeline = [ultimate_app]
+ ultimate_app._pipeline = pipeline
+ ultimate_app._pipeline_final_app = ultimate_app
app = ultimate_app
- app._pipeline_final_app = ultimate_app
for filter_app in filters:
- app = filter_app(app)
+ app = filter_app(pipeline[0])
+ pipeline.insert(0, app)
+ app._pipeline = pipeline
app._pipeline_final_app = ultimate_app
return app
return ctx.create()
@@ -430,6 +434,9 @@ def run_server(conf, logger, sock, global_conf=None, ready_callback=None,
# header; "Etag" just won't do).
'capitalize_response_headers': False,
}
+ if conf.get('keepalive_timeout'):
+ server_kwargs['keepalive'] = float(conf['keepalive_timeout']) or False
+
if ready_callback:
ready_callback()
# Yes, eventlet, we know -- we have to support bad clients, though
@@ -834,7 +841,7 @@ def run_wsgi(conf_path, app_section, *args, **kwargs):
return 1
# patch event before loadapp
- utils.eventlet_monkey_patch()
+ utils.monkey_patch()
# Ensure the configuration and application can be loaded before proceeding.
global_conf = {'log_name': log_name}