mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
Make curl follow redirections. wget already does.
BUG=chromium-os:10289 TEST=manual Set up a local URL that redirects, try it out. For example: ./recovery.sh http://www/~scottz/recovery2.conf should redirect to http://www.corp.google.com/~scottz/recovery2.conf Change-Id: I0a60784f414d69b9e3371b9546666dcdc8978d25 Review URL: http://codereview.chromium.org/5818002
This commit is contained in:
@@ -191,10 +191,10 @@ fetch_url() {
|
||||
if [ -z "$resume" ]; then
|
||||
# quietly fetch a new copy each time
|
||||
rm -f "$filename"
|
||||
curl -f -s -S -o "$filename" "$url"
|
||||
curl -L -f -s -S -o "$filename" "$url"
|
||||
else
|
||||
# continue where we left off, if possible
|
||||
curl -f -C - -o "$filename" "$url"
|
||||
curl -L -f -C - -o "$filename" "$url"
|
||||
# If you give curl the '-C -' option but the file you want is already
|
||||
# complete and the server doesn't report the total size correctly, it
|
||||
# will report an error instead of just doing nothing. We'll try to work
|
||||
|
||||
Reference in New Issue
Block a user