2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 12:17:44 +00:00

Fix download when nominally accepting gzip

The progress indicator and the format of the file may
be poorly impacted if the server implementation decides to
automatically gzip all return data.

Change-Id: I4a4eda14a1fe4fdd7c8f60216e0b0a7905f10b42
This commit is contained in:
Jarrod Johnson 2019-06-17 09:24:03 -04:00
parent 434f21ed31
commit e5bc31aeb7

View File

@ -213,7 +213,7 @@ class SecureHTTPConnection(httplib.HTTPConnection, object):
dlheaders = self.stdheaders.copy()
if 'Accept-Encoding' in dlheaders:
del dlheaders['Accept-Encoding']
webclient.request('GET', url)
webclient.request('GET', url, headers=dlheaders)
rsp = webclient.getresponse()
self._currdl = rsp
self._dlfile = file