From cd3035e5e9ec65d9c617846d693cb42dbded1496 Mon Sep 17 00:00:00 2001 From: Alexey Kamenskiy Date: Tue, 11 Oct 2016 18:21:39 +0800 Subject: [PATCH] Issue #7885 Don't raise error if response is 416 416 means there is no more bytes to download (which works only with `--continue-at -` of curl) --- lib/vagrant/util/downloader.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb index d9eace0c1..425160259 100644 --- a/lib/vagrant/util/downloader.rb +++ b/lib/vagrant/util/downloader.rb @@ -294,9 +294,13 @@ module Vagrant @logger.warn("Downloader exit code: #{result.exit_code}") parts = result.stderr.split(/\n*curl:\s+\(\d+\)\s*/, 2) parts[1] ||= "" - raise Errors::DownloaderError, - code: result.exit_code, - message: parts[1].chomp + if parts[1].include? "416" + # All good actually. 416 means there is no mory bytes to download + else + raise Errors::DownloaderError, + code: result.exit_code, + message: parts[1].chomp + end end result