The `is_fileobject()` function in utils.py would break when the respones
was a wrapped `HTTPResponse`'s `raw` attribute. This just adds the
`IOError` exception type to the `is_fileobject()` function so that the
response can be streamed normally.
Fixes#805
This module add a new cross platform event poller to gunicorn. It allows
you to listen on different fds in an efficient manner.
On linux it's using epoll, bsd/darwin kqueue...
Following some discussion on IRC with @GrahamDumpleton this patch only
close stdios if -R isn't specified. It also let others fds open and
don't try to close them.
This should fix logging around and behave like other daemons. It should
also close#309.
Enable inheritance for stdio file descriptors in daemon mode. It allows
you in daemon mode to redirect the output to a file if needed.
By default in daemon mode gunicorn will close all file handle except if
you pass the "-R" options. In this cases STDIO will be preserved.
fix#309
You can now pass a list of file descriptors to Gunicorn that won't be
closed when it starts. Allows someone to pass any stream to gunicorn or
set some redirection.
The Arbiter is smart about getting the CWD; first it checks the CWD
environment (which doesn't resolve symlinks), then it falls back to the
python os.getcwd() (which does resolve symlinks). However, the Arbiter
is the only place that does this, which will then do the right thing
when we reexec. However, when reloading the Arbiter, it won't pick up
changes if the symlink has changed.
By changing the *app.py entry points to also use the same method for
determining the CWD, we'll insert a symlink path into the first location
in sys.path. Then our reloaded app will correctly pull in any new
changes.
Add options to setup logging to syslog:
- `--log-syslog`: enable syslog. It default to `/var/run/syslog` on darwin,
`/var/run/log` on freebsd, `/dev/log` on openbsd and udp://localhost:514 for
other platforms.
- `--log-syslog-prefix: Pass the parameter to use as the program name
- `--log-syslog-to`: Setup the syslog address to send message. Address startinf
by udp:// will send to udp, unix:// to a unix socket and tcp:// to tcp (useful
for rsyslog)
fix#452 .
This patch makes sure that we now handle correctly bytes and native
strings on python 3:
- In python 3, sockets are now taking and returning bytes.
- according to PEP3333, headers should be native strings and body in
bytes.