1150 Commits

Author SHA1 Message Date
Randall Leeds
d44e3528b9 remove defunct email address from setup.cfg
I don't have an rpm machine handy anymore. I suspect this should
always have been filled in by the rpmbuild environment of the user
running the script, anyway, and I should not have been listed here.
2012-09-27 19:14:41 +02:00
Randall Leeds
dde77b73d1 add x-forwarded-proto as secure scheme default
Heroku uses this and it's the only one mentioned in Wikipedia's
list of common non-standard headers.

http://en.wikipedia.org/wiki/List_of_HTTP_header_fields
2012-09-27 19:14:41 +02:00
Randall Leeds
5f2a946f96 update PPA link 2012-09-27 19:14:41 +02:00
Xie Shi
274e43489b Workers won't be killed if timeout set to 0 2012-09-27 19:14:41 +02:00
Konstantin Enchant
8f4edfa0bf Callable hooks for paster config. 2012-09-27 19:14:41 +02:00
benoitc
f47d100446 initialize the logging config file with defaults.
Set correct default to the logging config file so we are able to use our
own loggers. While I'm here fix the example.
2012-09-27 19:14:40 +02:00
benoitc
1362132162 support file reopening & reexec for all loggers 2012-09-27 19:14:40 +02:00
Konstantin Kapustin
70534acde8 Implantation proxy protocol 2012-09-27 19:14:40 +02:00
Konstantin Kapustin
aa22115cfc Set timeout for client socket (slow client DoS). 2012-09-27 19:14:40 +02:00
Konstantin Kapustin
75933bae81 Change base-classes for NoMoreData, ChunkMissingTerminator and InvalidChunkSize.
If remote client send invalid data in request with "Transfer-Encoding:chunked" gunicorn can raised some exceptions (see http.body.ChunkedReader) as NoMoreData, ChunkMissingTerminator, InvalidChunkSize.

User application shouldn't know about specific gunicorn exceptions and must catch standard IOError if want.

Example:

    def app(env, start_response):

        body = env["wsgi.input"]

        chunk_size = 1024

        while True:
            try:
                chunk = body.read(chunk_size)
            except IOError:
                .. correct action for error

            if not chunk:
                break

            .. do somethink with chunk
2012-09-27 19:14:40 +02:00
Konstantin Kapustin
4be3282440 Check Content-Length header.
For not chunked request do validation Content-Length header and return 400 if invalid.
2012-09-27 19:14:40 +02:00
Konstantin Kapustin
238f252a3a Fixed output of content_length in access log. 2012-09-27 19:14:40 +02:00
Benoit Chesneau
52c057b92f Merge pull request #409 from aartur/master
Patch for nginx config change
2012-09-25 16:22:37 -07:00
aartur
d19d34d1b8 Safer nginx config (issue #404). 2012-09-22 22:12:34 +02:00
Konstantin Kapustin
d28366a683 Add ForwardedAllowIPS option. 2012-08-26 22:28:34 +02:00
Benoit Chesneau
ab5473be92 Merge pull request #385 from sirkonst/graceful_timeout
Fix graceful shutdown for gevent.
2012-08-26 12:48:44 -07:00
benoitc
fad7353d51 allows gunicorn to load a pre-compiled app. close #316
Patch adapted from the one submitted from @rbdrbd with a small change to
reuse the code.
2012-08-26 21:46:20 +02:00
Benoit Chesneau
f512679802 Merge pull request #393 from sirkonst/fix_check_LimitRequestLine
Fix LimitRequestLine check.
2012-08-21 13:48:42 -07:00
Konstantin Kapustin
4fdfc3a76b Fix LimitRequestLine check. 2012-08-20 16:02:52 +04:00
benoitc
27a9d7d24f only test master 2012-08-03 21:32:57 +02:00
Djoume Salvetti
97b43bd20a Create a pidfile before executing on_starting().
This will let a standard init script (or any script that look for a
pidfile) know that gunicorn is already running and won't attempt to run
it twice.
This would also enable the script to stop gunicorn even in it's startup
phase.
2012-08-03 21:27:36 +02:00
benoitc
17ce6958e3 fix config example. close #388
The setting named changed. spotted by @boyxuper. Thanks!
2012-08-03 06:31:01 +02:00
benoitc
4b478e1a66 fix request line check. close #390
We never had the possibility to check the limit since we were quitting
the loop before it.
2012-08-03 06:27:26 +02:00
Leonardo Santagada
db8cd1f74b Update doc/site/news.rst
fix wrong escaping
2012-08-03 06:09:33 +02:00
benoitc
3cd1a9acd9 log it as an exception 2012-08-03 06:04:08 +02:00
benoitc
acb3c5a817 bump to 0.14.6 2012-07-26 23:48:48 +02:00
Konstantin Kapustin
b9bb3453c2 Fix graceful shutdown for gevent.
server.stop() are blocking worker and which is then may be killed by Arbiter.murder_workers() with timeout (not graceful_timeout). It's issues when graceful_timeout > timeout.
2012-07-25 18:18:53 +04:00
benoitc
4d70a526f2 fix typo 2012-07-13 18:13:19 +02:00
Paul J. Davis
489e935038 Fix request line length check
We were accidentally including partial data when we didn't find the
request line terminating '\r\n'. This changes the check to make sure
we're testing the length after we assert there's no termination.
2012-07-04 15:53:10 -05:00
benoitc
5615464923 handle keepalive = 0
Keepalive=0 means that we aren't waiting for the next connection. So
make sure to send appropriate "close" header and that we handle the first
connection.
2012-07-04 09:34:12 +02:00
benoitc
cdd3e1dc2b check parents if we are in the worker. fix #348 2012-06-27 08:08:57 +02:00
benoitc
326356a18c sync doc 2012-06-24 19:05:41 +02:00
benoitc
5b0e8f9011 bump to 0.14.5 2012-06-24 18:16:48 +02:00
benoitc
67bd75f7b3 don't try to reopen files on initial startup. fix #358 2012-06-24 17:25:43 +02:00
benoitc
ace4a0d6ec qdd development2.ini for tests 2012-06-24 15:42:55 +02:00
benoitc
5c91bb1d55 add travis status 2012-06-24 14:46:23 +02:00
benoitc
45dac98bf9 add Marc Abramowitz to THANKS 2012-06-24 14:26:08 +02:00
benoitc
5ec16e6d0a update doc 2012-06-24 14:24:45 +02:00
benoitc
1edaef88dc close #330 2012-06-24 12:32:18 +02:00
benoitc
b85cf2852b close #365 2012-06-24 12:13:05 +02:00
Marc Abramowitz
103d291670 Add .travis.yml for Travis CI (http://travis-ci.org/) 2012-06-24 11:31:34 +02:00
Marc Abramowitz
0e88aa6907 Add tox support (http://tox.testrun.org/) 2012-06-24 11:31:34 +02:00
Konstantin Kapustin
9dba6bf7ec Small correct for handle_error.
1. client.getpeername() can raise "error: [Errno 107] Transport endpoint
is
not connected" if a client has unexpectedly disconnected.

2. I guess we do not need worry about sending error message to client.
2012-06-24 11:29:04 +02:00
benoitc
12a0e55bcf Revert "fix issue #348 ."
This reverts commit da637dfd13b520fc190b86967dfecc06bf97a2b4.
2012-06-19 10:31:06 +02:00
benoitc
512650d582 Merge branch 'master' of github.com:benoitc/gunicorn 2012-06-19 10:31:03 +02:00
benoitc
a68618c824 breaking change: take the control on graceful reload back
We really shouldn't allow the people to override the way we spawn the
new workers on reload. Graceful is about launching new worker and kill
olders after the graceful time.
2012-06-18 11:02:30 +02:00
benoitc
da637dfd13 fix issue #348 .
Rather than testing the parent pd, test if the parent pid is still
alive. Only use it in gevent for now.
2012-06-14 22:56:58 +02:00
benoitc
072d1b6156 add Caleb Brown to THANKS 2012-06-06 09:59:21 +02:00
Caleb Brown
2300c90b8d If keepalive is 0 use None so the timeout is ignored. 2012-06-06 09:59:21 +02:00
benoitc
e78d19019d apparently gevent doesn4t import gevent.core now 2012-06-06 09:59:21 +02:00