gunicorn 19.0 broke the tornado worker #783

g-p-g opened this Issue Jun 13, 2014 · 6 comments


None yet

3 participants

g-p-g commented Jun 13, 2014

After upgrading to gunicorn 19.0 the tornado worker which used to work with gunicorn 18.0 no longer does. It looks like the x_forwarded_for_header setting is no longer present in cfg (gunicorn.workers.gtornado.TornadoWorker @ run ~ line 95 or so), what's the expected way to use the new version?

[ERROR] Exception in worker process:
Traceback (most recent call last):
  File ".../python2.7/site-packages/gunicorn/", line 502, in spawn_worker
  File ".../python2.7/site-packages/gunicorn/workers/", line 120, in init_process
  File ".../python2.7/site-packages/gunicorn/workers/", line 96, in run
    server.xheaders = bool(self.cfg.x_forwarded_for_header)
  File ".../python2.7/site-packages/gunicorn/", line 55, in __getattr__
    raise AttributeError("No configuration setting for: %s" % name)
AttributeError: No configuration setting for: x_forwarded_for_header
tilgovi commented Jun 14, 2014

@benoitc looks like we broke tornado for real. We should do a quick fix release.

@benoitc benoitc added a commit that closed this issue Jun 14, 2014
@benoitc fix #783 fix tornado worker with missing option
Gunicorn doesn't ovveride the WSGI headers with the X heaaders anymore.
@benoitc benoitc closed this in 7b902a2 Jun 14, 2014
benoitc commented Jun 14, 2014

@tilgovi fixed. I will make a release today .

@g-p-g thanks for the report

g-p-g commented Jun 14, 2014

@benoitc that fix looks strange for an outsider as the removed line used to work before. Could you possibly point to some commit(s) that modified that behavior so it's no longer necessary to deal with X-FORWARDED-FOR in the tornado worker? Thanks.

benoitc commented Jun 14, 2014

@g-p-g c487368

My bad I forgot to document it in the changelog. will do in the next one.

benoitc commented Jun 14, 2014

@g-p-g also you can find the discussion in #633

g-p-g commented Jun 14, 2014

@benoitc thanks for the attention, both are helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment