1010 Commits

Author SHA1 Message Date
benoitc
f67993eb87 fix testing.
Note: it was also a good way to test HUP on master. worked like a charm.
2012-02-21 12:34:50 +01:00
benoitc
2d2260dd19 and remove useless print 2012-02-21 12:20:40 +01:00
benoitc
bea6e3b97f remove unecessary imports. 2012-02-21 12:19:42 +01:00
benoitc
a77a166b31 don't validate models and activate translation in run_gunicorn command.
close #293.

We already do that in the worker application load. Not doing it here
should fix application reload and issue with threads.
.
2012-02-21 11:21:58 +01:00
benoitc
98f57f3daf add admin so we can test with SQL eventually 2012-02-20 22:17:36 +01:00
benoitc
613437961e remove spurious print
shouldn't have been here.
2012-02-20 19:53:18 +01:00
benoitc
4ad614f46d add Kristian Glass to the THANKS. 2012-02-20 19:51:56 +01:00
Kristian Glass
415c5145c6 Updated docstring in config.py for the access_log_format directive to cover all of the atoms used in the default format 2012-02-20 19:51:19 +01:00
benoitc
f281e6da46 bump to 0.14.0 2012-02-20 11:33:25 +01:00
benoitc
81542622bb add Dan Callaghan to the THANKS 2012-02-20 11:25:05 +01:00
benoitc
be19f414ae close #294 .
Thanks for the patch
2012-02-20 11:23:58 +01:00
benoitc
cc26270783 close #170 .
add --check-config option to check the config and app loading.
2012-02-20 11:13:59 +01:00
benoitc
7a1c58f236 test number of headers fields and size.
Add --limit-request-fields (limit_request_fields) and
--limit-request-field-size (limit-request-field-size) options.

- limit_request_fields:

    Value is a number from 0 (unlimited) to 32768. This parameter is
    used to limit the number of headers in a request to prevent DDOS
    attack. Used with the `limit_request_field_size` it allows more
    safety.

- limit_request_field_size:

    Value is a number from 0 (unlimited) to 8190. to set the limit
    on the allowed size of an HTTP request header field.
2012-02-20 10:36:13 +01:00
benoitc
b7b0979ad9 check if Request Line is too large.
You can now pass the parameter --limit-request-line or set the
limit_request_line in your configuration file to set the max size of the
request line in bytes.

This parameter is used to limit the allowed size of a client's HTTP
request-line. Since the request-line consists of the HTTP method, URI,
and protocol version, this directive places a restriction on the length
of a request-URI allowed for a request on the server. A server needs
this value to be large enough to hold any of its resource names,
including any information that might be passed in the query part of a
GET request. By default this value is 4094 and can't be larger than
8190.

This parameter can be used to prevent any DDOS attack.
2012-02-20 09:56:06 +01:00
benoitc
6766c14793 pass config to the http parser. 2012-02-20 07:02:55 +01:00
benoitc
613378529b close #297 .
When the path starts with //, urlsplit considers it as a relative uri
while the RDF says it shouldnt (
http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2).

While I'm remove unncessary tests on netloc. The path never contains a
netloc or port.
2012-02-20 06:06:07 +01:00
benoitc
8e185d38d0 shouldn't be here. 2012-02-19 22:11:39 +01:00
benoitc
fd3fae1afd add app to test django 1.4 2012-02-19 22:09:32 +01:00
benoitc
cc43f89ef5 compatibility with django 1.4 and more related fixes.
- handle new way to launch applications in django 1.4
- simplify the way we discover the project path and settings
- add --pythonpath & --settings options for django applications
- still compatible with older versions (>=1.1)
-handle DJANGO_SETTINGS_MODULE env.

close #283, #275, #274, #241
2012-02-19 21:56:41 +01:00
benoitc
a3aa143fa3 useless 2012-02-19 17:15:52 +01:00
benoitc
cc99181cee logging.fileConfig support is back. 2012-02-19 17:07:42 +01:00
benoitc
85c60c26b5 redirect stdout & stderr to logging error file when output is different
from '-' . Useful to collect some errors.
2012-02-19 16:07:51 +01:00
benoitc
9b1aa8a159 close #300 .
according to the spec, CONTENT_LENGTH or CONTENT_TYPE may be empty or
absent. Don't force them to be empty then.
2012-02-19 12:06:26 +01:00
benoitc
9d89d4b00a close #287 .
describe explicitely where TTIN & TTOU signals should be sent.
2012-02-19 11:58:30 +01:00
benoitc
4888dc2ede add dnx to thanks. 2012-02-19 11:58:10 +01:00
benoitc
7b077b7d6a close #280 .
Integrate a subset of changes proposed by DNX. Since gunicorn can still be used
globally using some global envs variables. Thanks for the diff!
2012-02-19 11:46:56 +01:00
benoitc
f168a21dae fix whitespaces 2012-02-19 11:27:46 +01:00
Sergey Rublev
8bf793d2e5 Fix missed argument during refactoring 2012-02-01 11:59:53 -05:00
Paul J. Davis
5aa104f9ba Fixed typo in logger_class docs 2012-01-26 11:43:02 -06:00
Randall Leeds
74f0ecdbbf Fix using WSGI handlers with tornado worker
Without this, tornado.web.Application instances could be used as
a gunicorn application, but running a standard wsgi callback under
the tornado worker would fail.

``self.wsgi`` is the property that may be a tornado.web.Application.
The transformed application, whether originally tornado.web.Application
or a WSGI callable, should be the argument to HTTPServer.

Also, it's probably poor form to be mutating the properties of ``self``
here when a local variable suffices.
2011-11-15 14:30:48 -08:00
Evan Mezeske
d53112bbb2 iremove reap_workers from signaling . 2011-11-10 05:53:02 +01:00
Randall Leeds
f02b0d9cca update longpoll examples
Add a longpoll example for tornado and terminate the lines we send with
a '\n'.
2011-11-07 17:14:37 -08:00
Randall Leeds
b955407003 better logging on http parse errors
NoMoreData now inherits StopIteration and the StopIteration clause in
the workers logs the reason at debug level.
2011-11-07 14:56:59 -08:00
benoitc
c6f949b56b add Evan Mezeske to the THANKS 2011-10-25 21:55:16 +02:00
Evan Mezeske
3c1f1cb126 Don't call logging functions in the signal handler.
The standard logger uses locking functions which are NOT guaranteed to
be re-entrant [1], so this could (potentially) result in deadlock or a
crash.

[1] http://docs.python.org/library/logging.html Section 15.7.8.
2011-10-25 21:54:26 +02:00
Evan Mezeske
b5622f874b Log critical as critical, not exception.
This prevents weird things from happening when log.critical is called
in a non-except context.  Typically it would result in either 'None'
or the last exception being logged, neither of which is desirable.
2011-10-25 21:54:04 +02:00
Randall Leeds
951da38521 Merge pull request #276 from bgilbert/patch-1
Fix subcommand name in Django run_gunicorn error message
2011-10-19 13:37:09 -07:00
Benjamin Gilbert
f4a2f9fae5 Fix subcommand name in error message 2011-10-19 17:22:43 -03:00
Randall Leeds
3c47b20f03 typo - fix #273 2011-10-11 16:21:47 -07:00
Randall Leeds
58c3c5680d typo 2011-10-05 14:11:55 -07:00
benoitc
fef233dd5d manage multiple headers entry. Rather than waiting for the new HTTP
parser apply this patch now. Thanks @taejo for the patch. close #267
2011-10-05 14:16:41 +02:00
benoitc
f7b14431b9 allows people to set the X-Forwarded-For header key and disable it by
setting an empty string. close #268 . Thanks for the feedback!
2011-10-05 08:07:30 +02:00
benoitc
99d85e9cce make sure that the port is a string. close #271 thanks!! 2011-10-05 06:07:05 +02:00
benoitc
f2d9bf6b77 sync configure options. spotted by @j4mie on github. thanks! 2011-09-29 13:10:18 +02:00
benoitc
3acf75338f add accesslog example 2011-09-28 12:36:43 +02:00
benoitc
64e3ddab0a sync doc 2011-09-23 07:44:12 +02:00
benoitc
e1b516b230 better wording in changelog 2011-09-23 07:43:29 +02:00
benoitc
a4f22037c4 bump to 0.13.4
- fix closerange function on python 2.5 (typo)
2011-09-23 07:39:55 +02:00
Randall Leeds
0c4021d169 fix #262: typo krange -> xrange 2011-09-22 14:09:33 -04:00
benoitc
5dc53947ed sync doc 2011-09-19 23:39:57 +02:00