diff --git a/CHANGELOG.md b/CHANGELOG.md index 90cfde9d0..0a0b272df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Convert setup.py to pyproject.toml ([#920](https://github.com/Open-EO/openeo-python-client/issues/920)) - Make `_DerivedFrom._from_url` more resilient against unresolvable/unparsable `derived_from` links ([#928](https://github.com/Open-EO/openeo-python-client/issues/928), eu-cdse/openeo-cdse-infra#1338) +- `download_url()`: favor explicit HEAD status check over unhelpful auto-check ([#939](https://github.com/Open-EO/openeo-python-client/issues/939)) ### Removed diff --git a/openeo/rest/_connection.py b/openeo/rest/_connection.py index 42167ba74..ce521e47e 100644 --- a/openeo/rest/_connection.py +++ b/openeo/rest/_connection.py @@ -305,7 +305,7 @@ def download_url( chunk_size: int = DEFAULT_DOWNLOAD_CHUNK_SIZE, range_size: int = DEFAULT_DOWNLOAD_RANGE_SIZE, ) -> None: - head = self.head(url, stream=True) + head = self.head(url, stream=True, check_error=False) if head.ok and head.headers.get("Accept-Ranges") == "bytes" and "Content-Length" in head.headers: file_size = int(head.headers["Content-Length"]) self._download_ranged(