We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6e0cf3 commit 85d2f68Copy full SHA for 85d2f68
s3transfer/download.py
@@ -346,7 +346,7 @@ def _submit(
346
:param bandwidth_limiter: The bandwidth limiter to use when
347
downloading streams
348
"""
349
- if transfer_future.meta.size is None:
+ if transfer_future.meta.size is None and config.multipart_threshold > 0:
350
# If a size was not provided figure out the size for the
351
# user.
352
response = client.head_object(
@@ -364,7 +364,7 @@ def _submit(
364
365
# If it is greater than threshold do a ranged download, otherwise
366
# do a regular GetObject download.
367
- if transfer_future.meta.size < config.multipart_threshold:
+ if config.multipart_threshold <= 0 or transfer_future.meta.size < config.multipart_threshold:
368
self._submit_download_request(
369
client,
370
config,
0 commit comments