diff --git a/src/rankmirrors.sh.in b/src/rankmirrors.sh.in index c2f564b..a8de15c 100644 --- a/src/rankmirrors.sh.in +++ b/src/rankmirrors.sh.in @@ -62,7 +62,7 @@ err() { # gettime fetchurl (e.g gettime http://foo.com/core/os/i686/core.db.tar.gz) # returns the fetching time, or timeout, or unreachable gettime() { - IFS=' ' output=( $(curl -s -m $MAX_TIME -w "%{time_total} %{http_code}" "$1" -o/dev/null) ) + IFS=' ' output=( $(curl -L -s -m $MAX_TIME -w "%{time_total} %{http_code}" "$1" -o/dev/null) ) (( $? == 28 )) && echo timeout && return (( ${output[1]} >= 400 || ! ${output[1]} )) && echo unreachable && return echo "${output[0]}"