core: retry if server doesn't support byte ranges on download [GH-4479]
This commit is contained in:
parent
66c99ddb70
commit
e0ef592544
|
@ -63,6 +63,8 @@ BUG FIXES:
|
||||||
- core: don't check for metadata if the download URL is not HTTP [GH-6540]
|
- core: don't check for metadata if the download URL is not HTTP [GH-6540]
|
||||||
- core: don't make custom dotfile path if there is no Vagrantfile [GH-6542]
|
- core: don't make custom dotfile path if there is no Vagrantfile [GH-6542]
|
||||||
- core: more robust check for admin privs on Windows [GH-5616]
|
- core: more robust check for admin privs on Windows [GH-5616]
|
||||||
|
- core: properly detect when HTTP server doesn't support byte ranges and
|
||||||
|
retry from scratch [GH-4479]
|
||||||
- commands/box: removing all versions and providers of a box will properly
|
- commands/box: removing all versions and providers of a box will properly
|
||||||
clean all directories in `~/.vagrant.d/boxes` [GH-3570]
|
clean all directories in `~/.vagrant.d/boxes` [GH-3570]
|
||||||
- commands/rdp: prefer `xfreerdp` if it is available on Linux [GH-6475]
|
- commands/rdp: prefer `xfreerdp` if it is available on Linux [GH-6475]
|
||||||
|
|
|
@ -138,11 +138,14 @@ module Vagrant
|
||||||
# If we already retried, raise it.
|
# If we already retried, raise it.
|
||||||
raise if retried
|
raise if retried
|
||||||
|
|
||||||
|
@logger.error("Exit code: #{e.extra_data[:code]}")
|
||||||
|
|
||||||
# If its any error other than 33, it is an error.
|
# If its any error other than 33, it is an error.
|
||||||
raise if e.extra_data[:exit_code].to_i != 33
|
raise if e.extra_data[:code].to_i != 33
|
||||||
|
|
||||||
# Exit code 33 means that the server doesn't support ranges.
|
# Exit code 33 means that the server doesn't support ranges.
|
||||||
# In this case, try again without resume.
|
# In this case, try again without resume.
|
||||||
|
@logger.error("Error is server doesn't support byte ranges. Retrying from scratch.")
|
||||||
@continue = false
|
@continue = false
|
||||||
retried = true
|
retried = true
|
||||||
retry
|
retry
|
||||||
|
|
Loading…
Reference in New Issue