mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
speed gunicorn. Don't try to display requests log in info mode.
This commit is contained in:
parent
de3792b011
commit
615c6a6927
@ -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")
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user