1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 17:28:08 +00:00

Fix errors when enabling chunking

This commit is contained in:
Julien Duponchelle 2017-05-31 11:17:19 +02:00
parent 7044c8c9ff
commit 4f6cca0019
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -44,9 +44,9 @@ class Response(aiohttp.web.Response):
headers['Server'] = "Python/{0[0]}.{0[1]} GNS3/{1}".format(sys.version_info, __version__)
super().__init__(headers=headers, **kwargs)
def enable_chunked_encoding():
def enable_chunked_encoding(self):
# Very important: do not send a content length otherwise QT closes the connection (curl can consume the feed)
response.content_length = None
self.content_length = None
super().enable_chunked_encoding()
@asyncio.coroutine