From e5bc31aeb7ca066a2c196db9dc891bb0677f9ef1 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 17 Jun 2019 09:24:03 -0400 Subject: [PATCH] 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 --- pyghmi/util/webclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/util/webclient.py b/pyghmi/util/webclient.py index 360aec51..b3629701 100644 --- a/pyghmi/util/webclient.py +++ b/pyghmi/util/webclient.py @@ -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