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
|
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":
|
if self.parser.headers_dict.get('Except', '').lower() == "100-continue":
|
||||||
self.socket.send("100 Continue\n")
|
self.socket.send("100 Continue\n")
|
||||||
|
|||||||
@ -32,17 +32,11 @@ def close(sock):
|
|||||||
""" socket.close() doesn't *really* close if
|
""" socket.close() doesn't *really* close if
|
||||||
there's another reference to it in the TCP/IP stack.
|
there's another reference to it in the TCP/IP stack.
|
||||||
(trick from twisted)"""
|
(trick from twisted)"""
|
||||||
try:
|
|
||||||
sock.shutdown(2)
|
|
||||||
except socket.error:
|
|
||||||
pass
|
|
||||||
try:
|
try:
|
||||||
sock.close()
|
sock.close()
|
||||||
except socket.error:
|
except socket.error:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
del sock
|
|
||||||
|
|
||||||
def read_partial(sock, length):
|
def read_partial(sock, length):
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user