From adf353f213d12994cc36ecbbcb6a084baf1fda12 Mon Sep 17 00:00:00 2001 From: bninja Date: Wed, 24 Sep 2014 03:39:39 -0700 Subject: [PATCH] propagate proxy_protocol_info to keep-alive requests, fixes #899 --- gunicorn/workers/async.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gunicorn/workers/async.py b/gunicorn/workers/async.py index 4cfa7a86..feba3b08 100644 --- a/gunicorn/workers/async.py +++ b/gunicorn/workers/async.py @@ -38,12 +38,14 @@ class AsyncWorker(base.Worker): self.handle_request(listener_name, req, client, addr) else: # keepalive loop + proxy_protocol_info = req.proxy_protocol_info while True: req = None with self.timeout_ctx(): req = six.next(parser) if not req: break + req.proxy_protocol_info = proxy_protocol_info self.handle_request(listener_name, req, client, addr) except http.errors.NoMoreData as e: self.log.debug("Ignored premature client disconnection. %s", e)