Close all the listeners when the arbiter shuts down. By doing so,
workers can close the socket at the beginning of a graceful shut
down thereby informing the operating system that the socket can
be cleaned up. With this change, graceful exits with such workers
will refuse new connections while draining, allowing load balancers
to respond more quickly and avoiding leaving connections dangling
in the listen backlog, unaccepted.
Ref #922
Currently if you configure statsd_host, a configured logger_class will never be used.
I think this makes a user configured logger class always take priority.
(This is PoC change, I will come back and add tests/docs if it's worth pursuing)
Manually including the traceback in the log msg causes some issues when
interacting with log formats, and in one case was causing the traceback
to be printed twice.
Ensure that Gunicorn won't try to use chunked transfer-encoding for responses
to a HEAD request, so that `Response.close` will not write a terminating
chunk. Responses to a HEAD request MUST NOT have a message-body.
The application is still responsible for ensuring no message body is actually
generated in response to a HEAD request.
is_fileobject usgae was removed due to the use of the `tell` method check.
This change remove this check wich allows us to completely test if
fileno() is usable. Also it handle most of the exceptions around created by
breaking changes across Python versions. Hopefully we are good now.
fix#1174
Some systems edisable like SELINUX disable some flags so ignore the possible
error while chowning a log file. The error will be raised later anyway.
fix#1171
sendfile option don't set any default for now which makes the validation fail
(and then tests) since no boolean is given. For now just return when the value
is not set.
on OSX socket.TCP_FASTOPEN is set but make the server enter in a loop while
trying to set the options which makes gunicorn unusable.
For now remove TCP_FASTOPEN option until we find a solution