mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 18:35:18 +00:00
correct gzip detection
do not decode stream content for binary comparison
This commit is contained in:
parent
8a776a3ffc
commit
94fa7b58e4
@ -210,7 +210,7 @@ class HttpOpener(object):
|
||||
stream = requests.get(self.url, stream=True, verify=False)
|
||||
if stream.status_code == 200:
|
||||
try:
|
||||
stream_iterator = stream.raw.stream(2, decode_content=True)
|
||||
stream_iterator = stream.raw.stream(2)
|
||||
gz_header = stream_iterator.next()
|
||||
if gz_header[:2] == b'\037\213':
|
||||
logging.info("Ammofile data is in gz format")
|
||||
|
Loading…
Reference in New Issue
Block a user