By if the options ` --error-logfile` is set to '-' then wsgi.errors are
returned to sys.stderr, if any log file is passed either using the
log-config file or the option, Errors are written to the files.
By default no error is returned.
This changes allows a use to set the driver used to send the data over a
unix socket. 'dgram' for a dgram driver or 'stream' for a stream driver.
'stream' is the default. The change is documented in the settings
documentation.
fix#671
Gunicorn should generally only bother writing its own log and let
the application handle the way it want to log its own errors.
Now the log_file option will be overriden by the gunicorn options
`--error-logfile` and `--access-logfile` if they are given.
Gunicorn shouln't override the SERVER_* by the Host header. The client
will take care about it during the URL reconstruction if needed.
Since the spec don't support unix sockets, Gunicorn is using the HOST
heeader when available to create viable SERVER_* if possible so the
application and framworks will be happy. When the Host Header is not
available (SocketPath, '') is returned.
fix#628
The remote address should return the direct client addr not a forwarded
header.
This is a breaking change. The main problem with such changes is the way
the application or framework will handle the URL completion. Indeed most
of them are only expecting a TCP socket.
fix#633
`cfg.worker_class` is a property, which calls the classmethod `setup` of
the worker class when accessed. Gevent worker relies on this mechanism
to call `gevent.monkey.patch_all()`.
However, `num_workers` is a hooked property, when it is set, gunicorn
will call hook defined by user. If the hooked code relies on
gevent's monkey patch, it will fail because the monkey patch has not
been applied yet.
This commit makes sure that `worker_class` property getter invokes
before `num_workers` setter to resolve this problem.