From 0837348049bbdd24378ad9376caad932712d5acd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 Apr 2012 15:41:35 +0200 Subject: [PATCH] Follow redirects when checking for the existence of MANIFEST.bz2 If we don't follow redirects, we might think that MANIFEST.bz2 exists just because the HEAD request succeeds on the redirector URI. --- scripts/nix-pull.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index 136a5c9fa..084197c48 100755 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -50,7 +50,7 @@ sub processURL { my $manifest; # First see if a bzipped manifest is available. - if (system("$Nix::Config::curl --fail --silent --head '$url'.bz2 > /dev/null") == 0) { + if (system("$Nix::Config::curl --fail --silent --location --head '$url'.bz2 > /dev/null") == 0) { print "fetching list of Nix archives at `$url.bz2'...\n"; $manifest = downloadFile "$url.bz2"; }