Fix a crash in some cases

This commit is contained in:
Julien Duponchelle 2017-06-01 18:35:03 +02:00
parent ed656b7ab2
commit 823288dd0b
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -46,7 +46,8 @@ class Response(aiohttp.web.Response):
def enable_chunked_encoding(self):
# Very important: do not send a content length otherwise QT closes the connection (curl can consume the feed)
self.content_length = None
if self.content_length:
self.content_length = None
super().enable_chunked_encoding()
@asyncio.coroutine