From 81ea3c078eaf8af086ce232dc3937c8713469b6d Mon Sep 17 00:00:00 2001 From: benoitc Date: Mon, 1 Mar 2010 18:04:34 +0100 Subject: [PATCH] don't normalize headers. fix issue #27 --- doc/htdocs/configuration.html | 16 +++++++++++----- doc/htdocs/news.html | 16 +++++++++++++--- gunicorn/http/request.py | 3 +-- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/doc/htdocs/configuration.html b/doc/htdocs/configuration.html index bf2bafb1..fda259fd 100644 --- a/doc/htdocs/configuration.html +++ b/doc/htdocs/configuration.html @@ -49,7 +49,7 @@

The Configuration File

-

Gunciorn 0.5 introduced the ability to use a Python configuration file. Gunicorn will look for gunicorn.conf.py in the current working directory or what ever path is specified on the command line with the -c option.

+

Gunciorn 0.5 introduced the ability to use a Python configuration file. Gunicorn will look for gunicorn.conf.py in the current working directory or what ever path is specified on the command line with the -c option.

Example gunicorn.conf.py

@@ -63,6 +63,8 @@ workers = 1             # Number of workers to initialize
 umask = 0               # Umask to set when daemonizing
 user = None             # Change process owner to user
 group = None            # Change process group to group
+proc_name = None        # Change the process name
+tmp_upload_dir = None   # Set path used to store temporary uploads
 
 def after_fork(server, worker):
     fmt = "worker=%s spawned pid=%s"
@@ -86,23 +88,27 @@ def before_exec(server):
 
before_exec(server):
This function is called before relaunching the master. This happens when the master receives a HUP or USR2 signal.
bind:
-
The address on which workers are listening. It can be a TCP address with a format of IP:PORT or a Unix socket address like unix:/path/to/socketfile.
+
The address on which workers are listening. It can be a TCP address with a format of IP:PORT or a Unix socket address like unix:/path/to/socketfile.
daemon:
Whether or not to detach the server from the controlling terminal.
debug:
-
If True, only one worker will be launch and the variable wsgi.multiprocess will be set to False.
+
If True, only one worker will be launch and the variable wsgi.multiprocess will be set to False.
group:
The group in which worker processes will be launched.
logfile:
-
The path to the log file - (stdout) by default.
+
The path to the log file - (stdout) by default.
loglevel:
-
The level at which to log. info, debug, or error for instance. Only log messages of equal or greater severity are logged.
+
The level at which to log. info, debug, or error for instance. Only log messages of equal or greater severity are logged.
pidfile:
A file to store the master's PID.
+
proc_name:
+
If setproctitle is installed, it allows you to set the process name for this Gunicorn instance.
umask:
Used to set the umask when daemonizing.
user:
The user as which worker processes will by launched.
+
tmp_upload_dir:
+
Set the path used to store temporarily the body of the request.
diff --git a/doc/htdocs/news.html b/doc/htdocs/news.html index 4c7d99e9..96c29e96 100644 --- a/doc/htdocs/news.html +++ b/doc/htdocs/news.html @@ -50,6 +50,16 @@

News

+

0.6.2 / 2010-03-01

+
    +
  • Added support for chunked response.
  • +
  • Added possibility to configure proc_name in config file.
  • +
  • Improved HTTP parser. We now use buffers instead of strings to store temporary data.
  • +
  • Improved performance in send.
  • +
  • Workers are now murdered by age (the older is killed the first).
  • +
+
+

0.6.1 / 2010-02-24

  • Added gunicorn config file support for django admin command
  • @@ -57,21 +67,21 @@
  • Removed TTIN/TTOU from workers which blocked other signals.
-
+

0.6 / 2010-02-22

  • Added setproctitle
  • Change privilege switch behaviour. We now works like NGINX, master keep the permission, new uid/gid permissions are only set to the workers.
-
+

0.5.1 / 2010-02-22

  • Fix umask
  • Added debian packaging
-
+

0.5 / 2010-02-20

  • Added configuration file handler.
  • diff --git a/gunicorn/http/request.py b/gunicorn/http/request.py index 9dba66a6..d317d0fb 100644 --- a/gunicorn/http/request.py +++ b/gunicorn/http/request.py @@ -155,8 +155,7 @@ class Request(object): self.response_status = status for name, value in response_headers: - name = normalize_name(name) - if name == "Transfer-Encoding": + if name.lower() == "transfer-encoding": if value.lower() == "chunked": self.response_chunked = True if not isinstance(value, basestring):