76 Commits

Author SHA1 Message Date
benoitc
4a519f9d61 fix content length 2010-06-03 16:09:04 -04:00
benoitc
d9a2579613 naive working integration of simplehttp parser. async worker is slower
than the non async actually for unkown reason and slower than with old
parser.
2010-06-03 16:09:04 -04:00
benoitc
e06b44a28f fix issue #51. Support https schema. Pas an Http header to gunicorn :
X-Forwarded-Protocol=https , X-Forwarded-Ssl=on
2010-05-26 16:27:12 +02:00
Paul J. Davis
036f8b50d9 Major refactor of the configuration mechanics.
* All configuration and bootup is handled by the Application objects.

* There is now a strict ordering on the precedence of configuration
settings:

  1. Each option is given a default value of some sort in options.ini

  2. Any detectable framework configuration settings override the hard
     coded defaults for options. Currently, only Paster applications
     have support for this.

  3. Anything that is specified in a Gunicorn configuration file (by
     default gunicorn.conf.py) overrides what was possibly set by a
     framework specific configuration source.

  4. Anything specified on the command line reins supreme. The command
     line is the final authority on a given configuration option.
     Though, not all configuration options are available via command
     line.

* Configuration metadata is pulled from an options.ini. In the future I'll
use this to build the example gunicorn.conf.py and the config.rst file
in docs/site/config.rst.

I haven't tested the differences thoroughly. The next item on my agenda
is to figure out a way to start testing Gunicorn that doesn't make my
eyes bleed.
2010-05-19 13:39:37 -04:00
Paul J. Davis
0c935d06c7 Got the Sync and Eventlet workers running. 2010-04-15 21:20:17 -04:00
Paul J. Davis
51f1f22665 Refactoring worker code.
Also went through gunicorn.main lightly.
2010-04-15 20:08:28 -04:00
benoitc
7f97653bd4 fix issue #36. Thanks. 2010-04-03 18:05:26 +02:00
Paul Davis
e4b7263314 Fix async req/resp handlers. 2010-03-23 15:40:14 -04:00
Paul J. Davis
014d711bd7 Fix PEP 333 compliance for the write callable. 2010-03-23 14:58:10 -04:00
benoitc
9f572bc8ea add headers_sent guard. 2010-03-21 10:30:57 +01:00
benoitc
514a0ba0e3 change the way we handle last chunk, on't break but instead test if last
was an empty string. So we allows idiot content to send empty string at
first.
2010-03-19 10:00:15 +01:00
benoitc
771d44902a use formatted title so we make sure all browsers will correctly read
them
2010-03-18 08:58:05 +01:00
benoitc
562c9a2d70 revert previous change 2010-03-13 23:25:29 +01:00
benoitc
d21254edfc update readme 2010-03-13 23:21:42 +01:00
benoitc
f53532a92e always use TeeInput 2010-03-12 14:15:21 +01:00
benoitc
4873b41b33 use cstringio 2010-03-08 12:14:47 +01:00
benoitc
c785be0780 new parser using StringIO, faster than concatenate strings. Lot of fixes
in TeeInput.
2010-03-06 20:47:39 +01:00
benoitc
7f0b689851 fix 100-Continue. spotted by MattCampbell on irc. 2010-03-03 16:13:41 +01:00
benoitc
6fc3772c8c flacky my friend. spotted by jbergstroem 2010-03-01 18:22:43 +01:00
benoitc
81ea3c078e don't normalize headers. fix issue #27 2010-03-01 18:04:34 +01:00
benoitc
d33c5b6c86 fix issue #25. 2010-03-01 16:28:37 +01:00
benoitc
6deeeecc80 clean the code 2010-03-01 08:57:46 +01:00
benoitc
d92364af71 new read_partial function. We also now use buffer in parser. 2010-02-28 22:46:35 +01:00
benoitc
7cc365305d revert this patch since it cause more problem than it solves. 2010-02-27 23:02:15 +01:00
benoitc
49d340ce2b fix import 2010-02-27 17:32:05 +01:00
benoitc
cb706ea818 give me some coffee please 2010-02-27 15:55:36 +01:00
benoitc
ccedd37235 s/sock/util spotted by jbergstroem on irc 2010-02-27 15:51:20 +01:00
benoitc
2b556bb830 make it more compliant with the spec 2010-02-27 15:21:36 +01:00
benoitc
6df6e89cbc allow gunicorn to send chunked response (if Transfer-Encoding ==
chunked)
2010-02-26 14:05:35 +01:00
benoitc
47f755df9d SERVER_PORT should be a string. spotted by lericson on irc. while i'm
here fix tcp bind
2010-02-22 17:02:25 +01:00
benoitc
caba92d937 split only once 2010-02-18 11:56:41 +01:00
benoitc
ad1bd6d313 80 column 2010-02-18 11:51:31 +01:00
benoitc
c557ecc93b the way to get full path is "SCHEME://SERVER_NAME:SERVER_PORT" +
SCRIPT_NAME + PATH_INFO
2010-02-18 11:31:24 +01:00
benoitc
7ca593ace7 by default SCRIPT_name is an empy string. Value could be changed by
passing SCRIPT_NAME in environment (apache way) or as an HTTP header
(nginx way).
2010-02-18 11:15:28 +01:00
benoitc
e47f470a38 fix wsgi_multiprocess setting 2010-02-18 01:30:48 +01:00
Benoit Chesneau
ba8174626e speed remote and server address parsing 2010-02-18 01:23:39 +01:00
Benoit Chesneau
61840c3707 response headers should be a tupple. 2010-02-10 16:07:05 +01:00
Benoit Chesneau
43f4dd4109 fix 2010-02-03 16:17:17 +01:00
Benoit Chesneau
b681b11ed4 typo sigh. no cookie for me 2010-02-03 16:15:13 +01:00
Benoit Chesneau
b3496bcbd8 None != False 2010-02-03 16:13:35 +01:00
Benoit Chesneau
5796651a78 fix client_addr following observation of @dacisp and reading
http://en.wikipedia.org/wiki/X-Forwarded-For .
2010-02-03 16:09:31 +01:00
Benoit Chesneau
b7903be3f3 handle server_address and client_address in all connections types. 2010-02-03 14:38:55 +01:00
Paul J. Davis
9e717b8f9c Refactoring the worker loop.
Accidentally got a bit carried away.
2010-01-31 17:45:26 -05:00
Benoit Chesneau
e830a8f54d add debug option and support in paster. It allows us to work with paster
in debug mode and some other app that eval results. In debug mode only
one worker could be launch and wsgi.multiprocess is set to False.
2010-01-23 18:26:07 +01:00
Benoit Chesneau
f1466ad78f fix start_response to handle exc_info . 2010-01-23 14:26:25 +01:00
Benoit Chesneau
b0f1a0fe06 add django_paste command for paste-compatible projects. 2010-01-23 14:25:41 +01:00
Benoit Chesneau
99bb5b0de4 fix other issues spotted by pyflakes. 2010-01-21 22:40:53 +01:00
Eric Florenzano
036735b456 Used PyFlakes to detect and fix unneeded imports. 2010-01-21 13:23:35 -08:00
Benoit Chesneau
615c6a6927 speed gunicorn. Don't try to display requests log in info mode. 2010-01-21 14:15:21 +01:00
Benoit Chesneau
ec644bdf90 rename http_parser.py to parser.py we are already in http module 2010-01-21 01:13:12 +01:00