From 9f93451710a5da370b10d7f657910c2f332723e3 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Tue, 9 Jul 2013 11:13:04 +0100 Subject: [PATCH] Curl to redo the request (Found 302) The URL to download the Fedora 19 images is not persistent anymore, they are now download from http://download.fedoraproject.org where the request will be redirected to a different location. Passing the -L option to the curl command will make it redo the request on the new place and download the image correctly. Related to bug #1199237 Change-Id: Ib9b9d65734992e2bf1a6888c5f2eb9de366f8204 --- elements/cache-url/bin/cache-url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/cache-url/bin/cache-url b/elements/cache-url/bin/cache-url index 1429c40f..8f29cc03 100755 --- a/elements/cache-url/bin/cache-url +++ b/elements/cache-url/bin/cache-url @@ -34,7 +34,7 @@ else success="Downloaded and cached $url for the first time" fi -rcode=$(curl -o $tmp -w '%{http_code}' $url $time_cond) +rcode=$(curl -L -o $tmp -w '%{http_code}' $url $time_cond) if [ "$rcode" = "200" ] ; then echo $success mv $tmp $dest