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
This commit is contained in:
parent
a3f2836625
commit
fde4572764
@ -35,7 +35,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
rcode=$(curl -L -o $tmp -w '%{http_code}' $url $time_cond)
|
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,
|
# In cases where servers ignore the Modified time,
|
||||||
# curl cancels the download, outputs a 200 and leaves
|
# curl cancels the download, outputs a 200 and leaves
|
||||||
# the output file untouched, we don't want this empty file.
|
# the output file untouched, we don't want this empty file.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user