Pārlūkot izejas kodu

Merge branch 'bugfix/http-client-gzip-responses' of git://github.com/olasd/dulwich

Jelmer Vernooij 6 gadi atpakaļ
vecāks
revīzija
efbd433b28
1 mainītis faili ar 1 papildinājumiem un 4 dzēšanām
  1. 1 4
      dulwich/client.py

+ 1 - 4
dulwich/client.py

@@ -1435,10 +1435,7 @@ class HttpGitClient(GitClient):
         # `BytesIO`, if we can guarantee that the entire response is consumed
         # `BytesIO`, if we can guarantee that the entire response is consumed
         # before issuing the next to still allow for connection reuse from the
         # before issuing the next to still allow for connection reuse from the
         # pool.
         # pool.
-        if resp.getheader("Content-Encoding") == "gzip":
-            read = gzip.GzipFile(fileobj=BytesIO(resp.data)).read
-        else:
-            read = BytesIO(resp.data).read
+        read = BytesIO(resp.data).read
 
 
         resp.content_type = resp.getheader("Content-Type")
         resp.content_type = resp.getheader("Content-Type")
         resp.redirect_location = resp.get_redirect_location()
         resp.redirect_location = resp.get_redirect_location()