fix: do not process URL redirection until after ISO file name stored
This commit is contained in:
parent
44d0d10c6e
commit
57eea29cb2
6
quickget
6
quickget
|
@ -1448,8 +1448,7 @@ function web_pipe() {
|
||||||
|
|
||||||
# Download a file from the web
|
# Download a file from the web
|
||||||
function web_get() {
|
function web_get() {
|
||||||
local URL=""
|
local URL="${1}"
|
||||||
URL=$(web_redirect "${1}")
|
|
||||||
local DIR="${2}"
|
local DIR="${2}"
|
||||||
local FILE=""
|
local FILE=""
|
||||||
local USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
|
local USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
|
||||||
|
@ -1460,6 +1459,9 @@ function web_get() {
|
||||||
FILE="${URL##*/}"
|
FILE="${URL##*/}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Process any URL redirections after the file name has been extracted
|
||||||
|
URL=$(web_redirect "${URL}")
|
||||||
|
|
||||||
while (( "$#" )); do
|
while (( "$#" )); do
|
||||||
if [[ $1 == --header ]]; then
|
if [[ $1 == --header ]]; then
|
||||||
HEADERS+=("$1" "$2")
|
HEADERS+=("$1" "$2")
|
||||||
|
|
Loading…
Reference in New Issue