fix first line parsing and make sure master is killed when ctrl-c is

pressed
This commit is contained in:
Benoit Chesneau 2009-12-03 10:38:33 +01:00
parent 34db4a6669
commit 83ebc51520
2 changed files with 3 additions and 1 deletions

View File

@ -76,6 +76,8 @@ class Arbiter(object):
except OSError, e:
if e.errno not in [errno.EAGAIN, errno.EINTR]:
raise
except KeyboardInterrupt:
sys.exit()
def listen(self, addr):
for i in range(5):

View File

@ -185,7 +185,7 @@ class HTTPRequest(object):
self.socket.close()
def first_line(self, line):
method, path, version = line.split(" ")
method, path, version = line.strip().split(" ")
self.version = version.strip()
self.method = method.upper()
self.path = path