speed gunicorn. Don't try to display requests log in info mode.

This commit is contained in:
Benoit Chesneau 2010-01-21 14:15:21 +01:00
parent de3792b011
commit 615c6a6927
2 changed files with 3 additions and 9 deletions

View File

@ -75,9 +75,9 @@ class HttpRequest(object):
if i != -1: break
self.log.info("%s", self.parser.status)
self.log.debug("%s", self.parser.status)
self.log.info("Got headers:\n%s" % headers)
self.log.debug("Got headers:\n%s" % headers)
if self.parser.headers_dict.get('Except', '').lower() == "100-continue":
self.socket.send("100 Continue\n")

View File

@ -32,18 +32,12 @@ def close(sock):
""" socket.close() doesn't *really* close if
there's another reference to it in the TCP/IP stack.
(trick from twisted)"""
try:
sock.shutdown(2)
except socket.error:
pass
try:
sock.close()
except socket.error:
pass
del sock
def read_partial(sock, length):
def read_partial(sock, length):
while True:
try:
ret = select.select([sock.fileno()], [], [], 0)