We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e64ddff commit 69af9a8Copy full SHA for 69af9a8
openeo/rest/job.py
@@ -420,7 +420,7 @@ def load_bytes(self) -> bytes:
420
421
def _download_to_file(self, url: str, target: Path, chunk_size: int):
422
head = self.job.connection.head(url, stream=True)
423
- if head.ok and 'Accept-Ranges' in head.headers and 'bytes' in head.headers['Accept-Ranges']:
+ if head.ok and head.headers.get("Accept-Ranges") == "bytes":
424
file_size = int(head.headers['Content-Length'])
425
self._download_chunked(url=url, target=target, file_size=file_size, chunk_size=chunk_size)
426
else:
0 commit comments