diff --git a/CHANGES.rst b/CHANGES.rst index 6b7a418315..9540003431 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -28,6 +28,8 @@ mast - Filtering by file extension or by a string column is now case-insensitive in ``MastMissions.filter_products`` and ``Observations.filter_products``. [#3427] +- Switch to use HTTP continuation for partial downloads. [#3448] + Infrastructure, Utility and Other Changes and Additions ------------------------------------------------------- diff --git a/astroquery/mast/collections.py b/astroquery/mast/collections.py index ffab0d18f2..48d23fd95b 100644 --- a/astroquery/mast/collections.py +++ b/astroquery/mast/collections.py @@ -601,7 +601,7 @@ def download_hsc_spectra(self, spectra, *, download_dir=None, cache=True, curl_f bundler_response = response[0].json() local_path = os.path.join(download_dir, "{}.sh".format(download_file)) - self._download_file(bundler_response['url'], local_path, head_safe=True, continuation=False) + self._download_file(bundler_response['url'], local_path, head_safe=True) status = "COMPLETE" msg = None diff --git a/astroquery/mast/observations.py b/astroquery/mast/observations.py index 320af9ed78..a515960ff7 100644 --- a/astroquery/mast/observations.py +++ b/astroquery/mast/observations.py @@ -670,11 +670,11 @@ def download_file(self, uri, *, local_path=None, base_url=None, cache=True, clou else: log.warning("Falling back to mast download...") self._download_file(escaped_url, local_path, - cache=cache, head_safe=True, continuation=False, + cache=cache, head_safe=True, verbose=verbose) else: self._download_file(escaped_url, local_path, - cache=cache, head_safe=True, continuation=False, + cache=cache, head_safe=True, verbose=verbose) # check if file exists also this is where would perform md5,