diff --git a/CHANGELOG.md b/CHANGELOG.md index 36d37c103..9c9cb7187 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,8 @@ BUG FIXES: - 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: 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 clean all directories in `~/.vagrant.d/boxes` [GH-3570] - commands/rdp: prefer `xfreerdp` if it is available on Linux [GH-6475] diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb index edaf99e85..03e623897 100644 --- a/lib/vagrant/util/downloader.rb +++ b/lib/vagrant/util/downloader.rb @@ -138,11 +138,14 @@ module Vagrant # If we already retried, raise it. raise if retried + @logger.error("Exit code: #{e.extra_data[:code]}") + # 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. # In this case, try again without resume. + @logger.error("Error is server doesn't support byte ranges. Retrying from scratch.") @continue = false retried = true retry