From 66546d66df464d288b2f019fcc04de8396731ff6 Mon Sep 17 00:00:00 2001 From: benoitc Date: Mon, 2 May 2016 15:04:30 +0200 Subject: [PATCH] fix #1246 --- examples/example_config.py | 2 +- gunicorn/workers/gtornado.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/example_config.py b/examples/example_config.py index 89599f4c9..b942f09b9 100644 --- a/examples/example_config.py +++ b/examples/example_config.py @@ -70,7 +70,7 @@ # A positive integer. Generally set in the 1-5 seconds range. # -workers = 1 +workers = 4 worker_class = 'sync' worker_connections = 1000 timeout = 30 diff --git a/gunicorn/workers/gtornado.py b/gunicorn/workers/gtornado.py index 53c51ac41..2337991b0 100644 --- a/gunicorn/workers/gtornado.py +++ b/gunicorn/workers/gtornado.py @@ -27,7 +27,8 @@ def setup(cls): def clear(self): old_clear(self) - self._headers["Server"] += " (Gunicorn/%s)" % gversion + if not "Gunicorn" in self._headers["Server"]: + self._headers["Server"] += " (Gunicorn/%s)" % gversion web.RequestHandler.clear = clear sys.modules["tornado.web"] = web