refactor: optimise web_pipe() to follow redirections but not resolve them

This commit is contained in:
Martin Wimpress 2024-04-20 23:57:12 +01:00 committed by Martin Wimpress
parent 41264636ea
commit afb872d9f4
1 changed files with 1 additions and 3 deletions

View File

@ -1416,9 +1416,7 @@ function check_hash() {
# Download a file from the web and pipe it to stdout # Download a file from the web and pipe it to stdout
function web_pipe() { function web_pipe() {
local URL="" curl --silent --location "${1}"
URL=$(web_redirect "${1}")
curl --silent --location "${URL}"
} }
# Download a file from the web # Download a file from the web