Set the correct Connection header in sync workers.

We forgot to force this when we changed to HTTP/1.1 responses for the
async worker classes. Thanks to @russss on Twitter for the report.
This commit is contained in:
Paul J. Davis 2010-11-08 12:55:08 -05:00
parent 011ae33c0a
commit fc96d45838

View File

@ -93,10 +93,13 @@ class SyncWorker(base.Worker):
self.cfg.pre_request(self, req)
resp, environ = wsgi.create(req, client, addr,
self.address, self.cfg)
# Force the connection closed until someone shows
# a buffering proxy that supports Keep-Alive to
# the backend.
resp.force_close()
self.nr += 1
if self.nr >= self.max_requests:
self.log.info("Autorestarting worker after current request.")
resp.force_close()
self.alive = False
respiter = self.wsgi(environ, resp.start_response)
for item in respiter: