Skip to content

Commit 70b12f6

Browse files
committed
allow any encoding type for downloads. fixes MIT-LCP#140
1 parent 98166da commit 70b12f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wfdb/io/download.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def _stream_dat(file_name, pb_dir, byte_count, start_byte, dtype):
145145
# Specify the byte range
146146
end_byte = start_byte + byte_count - 1
147147
headers = {"Range":"bytes=%d-%d" % (start_byte, end_byte),
148-
'Accept-Encoding': '*/*'}
148+
'Accept-Encoding': '*'}
149149

150150
# Get the content
151151
response = requests.get(url, headers=headers, stream=True)
@@ -330,7 +330,7 @@ def dl_pb_file(inputs):
330330
# Local file is smaller than it should be. Append it.
331331
if local_file_size < remote_file_size:
332332
print('Detected partially downloaded file: %s Appending file...' % local_file)
333-
headers = {"Range": "bytes="+str(local_file_size)+"-", 'Accept-Encoding': '*/*'}
333+
headers = {"Range": "bytes="+str(local_file_size)+"-", 'Accept-Encoding': '*'}
334334
r = requests.get(url, headers=headers, stream=True)
335335
print('headers: ', headers)
336336
print('r content length: ', len(r.content))

0 commit comments

Comments
 (0)