Since the updated RFC 7230 implys that new Headers Key and Value should be
sent as USASCII only don't try to test utf8 headers in examples.
We now only encode them to ascii. Gunicorn will fail if it's unable to encode
them letting the responsability to the application to correctly encode the
response. (we are just a gateway).
While i'm here simplify the code to not create an extra function only used at
one place.
NOTE: if anyone come to a better solution, i am happy to revisit it on the
next release.
fix#1151
I took the suggestion of @asvetlov. This change load first all the body
in RAM in the gaiohttp worker to handle classic WSGI application. This
is a temporary fix, it should be replaced asap by a streaming behaviour.
It does the trick anyway for most application since you're not supposed
to handle large body directly with gunicorn.
fix#803
This will restore graceful shutdown of workers by master.
Also worker_int callback is moved from handle_exit (INT and TERM before switching) to handle_quit(INT and QUIT).
PR that rebase #651. Should also fix#625.
Add the capability to load gunicorn.base.Application without the
loading of the arguments of the command line.
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.
This command line argunment allows someone to pass an environement variable to
gunicorn:
$ gunicorn --env FOO=1 test:app
With the command line above the application will be able to use the FOO
environment vatriable.
It is now possible to specify a file with "config" as an application
configuration key in a paste deploy configuration file. This allows
paster applications to use the full range of gunicorn settings even
when using paste/pserve rather than gunicorn_paster.
Fixes#540.
Instead of faking STDIN/STDERR to a fake object that we close on reopen,
simply redirect them to a file and reopen this one when need.
Should fix most of the issues on #309
Allows gunicorn to listen on different interface. It can be either ipv6,
unix or ipv4 sockets.
Ex:
gunicorn -w3 -b 127.0.0.1:8001 -b 127.0.0.1:8000 -b [::1]:8000 test:app
fix#444