| |
@@ -239,6 +239,9 @@
|
| |
headers = {}
|
| |
|
| |
headers.setdefault("User-Agent", "rpmdev-spectool")
|
| |
+ # identity should prevent servers from sending gzip-compressed text
|
| |
+ # which would later not be decompressed because we set decode_content=False
|
| |
+ headers.setdefault("Accept-Encoding", "identity")
|
| |
|
| |
ret = requests.get(url, headers=headers, stream=True)
|
| |
ret.raise_for_status()
|
| |
This should fix both the issues:
texts compressed: https://pagure.io/rpmdevtools/issue/76
$ file tor-0.4.5.4-rc.tar.gz tor-0.4.5.4-rc.tar.gz.asc xrootd-5.0.3.tar.gz
tor-0.4.5.4-rc.tar.gz: gzip compressed data, max compression, from Unix, original size modulo 2^32 35962880
tor-0.4.5.4-rc.tar.gz.asc: PGP signature Signature (old)
xrootd-5.0.3.tar.gz: gzip compressed data, max compression, from Unix, original size modulo 2^32 981462405