886 Commits

Author SHA1 Message Date
Alexandre Zani
12ec996d54 Close connection on error after sending started.
When the application starts yielding a body and then raises an error,
we should immediately close the connection to the client to indicate
the error.
2013-04-21 15:01:18 +02:00
Krzysztof Urbaniak
e948195aa9 systemd socket activation 2013-04-21 14:56:06 +02:00
benoitc
ba25de4c1c don't close on exec STDOUT/STDERR 2013-04-21 12:09:46 +02:00
benoitc
c9fcb25f51 add GUNICORN_INHERIT_FDS environment variable support
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.
2013-04-21 11:57:38 +02:00
benoitc
5e08c27495 improve STDOUT/STDERR logging redirection.
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
2013-04-21 11:31:58 +02:00
benoitc
9acafc25f0 catch ValueError when ipv6 isn't not supported on the platform
fix #479
2013-04-21 07:47:19 +02:00
benoitc
c31e0f9ac7 Exit when the config file isn't found.
fix #469
2013-04-21 07:40:06 +02:00
benoitc
038ae7a86c add dd `python -m gunicorn.app.wsgiapp`` support
fix #493
2013-04-21 07:03:59 +02:00
benoitc
765839b2ad we only care of it if gunicorn was started as a daemon
fix #466
2013-04-21 07:00:03 +02:00
benoitc
b263f21646 bump to 0.17.3 2013-04-18 16:46:41 +02:00
benoitc
1a1c9572ef add fileno method to glogging.LazyWriter
fix #496
2013-04-18 16:20:34 +02:00
jean-philippe serafin
1911facf1a improve logger overide
- add Logger.atoms() that facilitates log format override.
- add Logger.atoms_wrapper_class that permits custom wrapping.

fix #510
2013-04-18 16:06:36 +02:00
benoitc
fcc1f5a698 fix doc link
related to issue #484
2013-04-18 15:07:05 +02:00
Chris Streeter
e908ec3359 Consistently get CWD across apps and arbiter.
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.
2013-04-03 11:15:53 +02:00
benoitc
78478de364 fix pythonpath option.
fix #501
2013-04-03 11:09:12 +02:00
Kevin Luikens
770005f73d use byte string when writing to pid file - fix #504 2013-03-19 13:44:21 -07:00
Kenneth Reitz
a314f5adb1 Merge pull request #485 from mahmoud/master
Remove ctypes dependency in util
2013-03-18 13:54:51 -07:00
Konstantin Enchant
b6d72504eb Fixed stop all servers (gevent worker). 2013-02-25 14:25:08 +04:00
Konstantin vz'One Enchant
a33211b3f3 Merge pull request #488 from streeter/patch-1
Typo fix (docstring)
2013-02-25 01:29:45 -08:00
Konstantin vz'One Enchant
6f03b38401 Merge pull request #489 from streeter/patch-2
Fix a typo (comment).
2013-02-25 01:28:03 -08:00
Konstantin vz'One Enchant
1c920d64cd Merge pull request #468 from dmedvinsky/minor_stuff
Use `getattr` with default instead of `if hasattr/else`
2013-02-25 01:26:17 -08:00
Chris Streeter
5b7696f032 Fix a typo. 2013-02-19 18:28:54 -08:00
Chris Streeter
25283ea262 Fix a Typo 2013-02-19 18:18:41 -08:00
Mahmoud Hashemi
22dccb3349 remove ctypes dependency for unsigned integer math related to setgid. this should re-enable selinux usage (and usage on other systems without ctypes). 2013-02-12 23:01:56 -08:00
Mahmoud Hashemi
318b365b8a fixed unreachable code surrounding 'unix://' addresses. 2013-02-12 22:58:05 -08:00
Stephane Wirtel
8a0977a12c fix typo 2013-02-07 16:35:49 +01:00
Dmitry Medvinsky
25e22e31df Use getattr with default instead of if hasattr/else 2013-01-08 18:23:14 +04:00
benoitc
31e259ea97 say hello to 0.17.2 2013-01-06 18:56:56 +01:00
Qiangning Hong
ec7f75f48f optimize readline()
Use less memory when processing file uploading, to be fast and safe
2013-01-06 18:49:30 +01:00
benoitc
eb73681181 make import errors more visible
fix #461
2013-01-06 12:47:06 +01:00
benoitc
8ab090aafb don't remove the file under cygwin.
Thanks to @pombredanne for the report. fix #407
2013-01-06 08:23:36 +01:00
benoitc
84d9f4c604 don't pass ssl_options if there are any.
some versions of tornado fail when passing empty ssl options. This
change fix it.

fix #465
2013-01-06 08:12:40 +01:00
benoitc
030468d2cd don't accept str or unicode in the body. 2013-01-06 07:59:41 +01:00
benoitc
b8ea96b6a3 bump to 0.17.1 2013-01-05 09:48:33 +01:00
Greg McGuire
02db7ecaad Set wsgi url_scheme to https if configured for SSL 2013-01-05 09:27:32 +01:00
benoitc
1409d6c470 only display the program name, not the path 2013-01-05 09:24:06 +01:00
Dan Callaghan
6f4e902b3e ArgumentParser no longer accepts version in Python 3.3 2013-01-05 09:18:02 +01:00
benoitc
927e04ab6d add syslog facility name setting 2012-12-25 23:05:40 +01:00
benoitc
a1baec5817 fix help formatting 2012-12-25 06:42:23 +01:00
benoitc
d314c53c3d document a little more --log-syslog-prefix option 2012-12-25 06:40:15 +01:00
benoitc
1ee87c1dc8 document syslog handler code 2012-12-25 06:37:48 +01:00
benoitc
82cc98746e say hello to 0.17.0 2012-12-25 06:35:43 +01:00
benoitc
89a1936ce6 fix syslog prefix 2012-12-25 06:28:20 +01:00
benoitc
a1058bc7fe add line 2012-12-25 06:25:25 +01:00
benoitc
dae4d38705 add syslog support.
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 .
2012-12-25 06:19:06 +01:00
benoitc
ac1af72922 s/optparse/argparse 2012-12-25 06:19:06 +01:00
Adnane Belmadiaf
20cd49595a PEP8 fixes 2012-12-24 09:53:03 +01:00
Adnane Belmadiaf
1c9b8460b1 s/create_sockeSt/create_sockets 2012-12-22 08:58:46 +01:00
Adnane Belmadiaf
fa37b90ad8 Append acceptors in EventletWorker 2012-12-21 15:46:00 +01:00
benoitc
77251d9d30 make sure we don't prematuraly close the fd of the worker tmp file.
fix #407
2012-12-21 15:43:26 +01:00