diff --git a/quickget b/quickget index f97b5f3..0c9eb32 100755 --- a/quickget +++ b/quickget @@ -1440,13 +1440,8 @@ function check_hash() { } function web_pipe() { - # Check for URL redirections - # Output to nonexistent directory so the download fails fast - local URL="${1}" - local REDIRECT_URL=$(curl --silent --location --fail "${URL}" --write-out %{url_effective} --output /var/cache/${RANDOM}/${RANDOM}) - if [ "${REDIRECT_URL}" != "${URL}" ]; then - URL="${REDIRECT_URL}" - fi + local URL="" + URL=$(web_redirect "${1}") curl --silent --location "${URL}" }