mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix first line parsing and make sure master is killed when ctrl-c is
pressed
This commit is contained in:
parent
34db4a6669
commit
83ebc51520
@ -76,6 +76,8 @@ class Arbiter(object):
|
|||||||
except OSError, e:
|
except OSError, e:
|
||||||
if e.errno not in [errno.EAGAIN, errno.EINTR]:
|
if e.errno not in [errno.EAGAIN, errno.EINTR]:
|
||||||
raise
|
raise
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
def listen(self, addr):
|
def listen(self, addr):
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
|
|||||||
@ -185,7 +185,7 @@ class HTTPRequest(object):
|
|||||||
self.socket.close()
|
self.socket.close()
|
||||||
|
|
||||||
def first_line(self, line):
|
def first_line(self, line):
|
||||||
method, path, version = line.split(" ")
|
method, path, version = line.strip().split(" ")
|
||||||
self.version = version.strip()
|
self.version = version.strip()
|
||||||
self.method = method.upper()
|
self.method = method.upper()
|
||||||
self.path = path
|
self.path = path
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user