test only if clengtih is defined.

This commit is contained in:
Benoit Chesneau 2011-01-15 17:50:59 +01:00
parent f942b3a8b2
commit a1ced17d8b

View File

@ -166,7 +166,7 @@ class Response(object):
# Only use chunked responses when the client is
# speaking HTTP/1.1 or newer and there was
# no Content-Length header set.
if self.clength:
if self.clength is not None:
return False
elif self.req.version <= (1,0):
return False