Skip to content

Commit 8c05f75

Browse files
authored
Merge pull request #3448 from snbianco/continue-downloads
2 parents 06cb452 + e88d686 commit 8c05f75

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ mast
2828
- Filtering by file extension or by a string column is now case-insensitive in ``MastMissions.filter_products``
2929
and ``Observations.filter_products``. [#3427]
3030

31+
- Switch to use HTTP continuation for partial downloads. [#3448]
32+
3133

3234
Infrastructure, Utility and Other Changes and Additions
3335
-------------------------------------------------------

astroquery/mast/collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ def download_hsc_spectra(self, spectra, *, download_dir=None, cache=True, curl_f
601601
bundler_response = response[0].json()
602602

603603
local_path = os.path.join(download_dir, "{}.sh".format(download_file))
604-
self._download_file(bundler_response['url'], local_path, head_safe=True, continuation=False)
604+
self._download_file(bundler_response['url'], local_path, head_safe=True)
605605

606606
status = "COMPLETE"
607607
msg = None

astroquery/mast/observations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,11 +670,11 @@ def download_file(self, uri, *, local_path=None, base_url=None, cache=True, clou
670670
else:
671671
log.warning("Falling back to mast download...")
672672
self._download_file(escaped_url, local_path,
673-
cache=cache, head_safe=True, continuation=False,
673+
cache=cache, head_safe=True,
674674
verbose=verbose)
675675
else:
676676
self._download_file(escaped_url, local_path,
677-
cache=cache, head_safe=True, continuation=False,
677+
cache=cache, head_safe=True,
678678
verbose=verbose)
679679

680680
# check if file exists also this is where would perform md5,

0 commit comments

Comments
 (0)