update readme

This commit is contained in:
benoitc 2010-03-13 23:21:42 +01:00
parent 33cf5dab01
commit d21254edfc
5 changed files with 7 additions and 23 deletions

View File

@ -1,20 +0,0 @@
bind='unix:/tmp/gunicorn.sock',
daemon=True,
debug=False,
logfile='/var/log/gunicorn.log',
loglevel='info',
pidfile='/var/run/gunicorn.pid',
workers=1,
umask=0,
# for systems with nobody and no group
user="nobody",
group="nogroup",
after_fork=lambda server, worker: server.log.info(
"worker=%s spawned pid=%s" % (worker.id, str(worker.pid))),
before_fork=lambda server, worker: server.log.info(
"worker=%s spawning" % worker.id),
before_exec=lambda server: server.log.info("forked child, reexecuting")

View File

@ -412,5 +412,5 @@ class Arbiter(object):
worker.tmp.close()
os.unlink(worker.tmpname)
except (KeyError, OSError):
pass
return
raise

View File

@ -74,6 +74,8 @@ class Request(object):
self.log.debug("%s", self.parser.status)
self.log.debug("Headers:\n%s" % headers)
if not headers:
return
if self.parser.headers_dict.get('Expect','').lower() == "100-continue":
self._sock.send("HTTP/1.1 100 Continue\r\n\r\n")

View File

@ -34,7 +34,9 @@ class TeeInput(object):
self._is_socket = True
self._len = parser.content_len
if self._len and self._len < util.MAX_BODY:
if not self.parser.content_len and not self.parser.is_chunked:
self.tmp = StringIO()
elif self._len and self._len < util.MAX_BODY:
self.tmp = StringIO()
else:
self.tmp = tempfile.TemporaryFile(dir=self.conf['tmp_upload_dir'])

View File

@ -33,9 +33,9 @@ class BaseSocket(object):
def set_options(self, sock, bound=False):
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.setblocking(0)
if not bound:
self.bind(sock)
sock.setblocking(0)
sock.listen(self.conf['backlog'])
return sock