From fde4572764923623da5a208c31a17154fcfc5299 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 12 Feb 2014 15:11:03 +0000 Subject: [PATCH] Teach cache-url to handle file:// URIs. We can now support file:// URIs in source-repositories files and other places, by ignoring curl's inability to determine an HTTP status code for them. Change-Id: Ie226ce05ecb912b23cedc73fd7ba53c0b9c0fe35 --- 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 312cbe5ed..25ef9a36f 100755 --- a/elements/cache-url/bin/cache-url +++ b/elements/cache-url/bin/cache-url @@ -35,7 +35,7 @@ else fi rcode=$(curl -L -o $tmp -w '%{http_code}' $url $time_cond) -if [ "$rcode" = "200" ] ; then +if [ "$rcode" == "200" -o "${url:0:7}" == "file://" ] ; then # In cases where servers ignore the Modified time, # curl cancels the download, outputs a 200 and leaves # the output file untouched, we don't want this empty file.