fixed gzip support

This commit is contained in:
galgolan 2016-09-05 15:32:21 +03:00
parent aff490beea
commit 76264fd19f
1 changed files with 5 additions and 1 deletions

View File

@ -383,7 +383,11 @@ def getConfig():
response = uh.open(request) response = uh.open(request)
text = gzip.GzipFile(fileobj=StringIO.StringIO(response.read())).read() if (response.headers['content-encoding'] == 'gzip'):
text = gzip.GzipFile(fileobj=StringIO.StringIO(response.read())).read()
else:
text = response.read()
configxml = [] configxml = []
configxml.append(text) configxml.append(text)