fix should_close. not really useful in gunicorn case but then we are in

sync with restkit
This commit is contained in:
benoitc 2010-02-26 23:26:15 +01:00
parent 6df6e89cbc
commit d91939f110

View File

@ -105,12 +105,13 @@ class Parser(object):
def should_close(self): def should_close(self):
if self._should_close: if self._should_close:
return True return True
if self.headers_dict.get("Connection") == "close": elif self.headers_dict.get("Connection") == "close":
return True return True
if self.headers_dict.get("Connection") == "Keep-Alive": elif self.headers_dict.get("Connection") == "Keep-Alive":
return False return False
if int("%s%s" % self.version) < 11: elif self.version < (1,0):
return True return True
return False
@property @property
def is_chunked(self): def is_chunked(self):