curl --disable
This commit is contained in:
parent
ea89234186
commit
160ba86dc0
10
quickget
10
quickget
|
|
@ -400,12 +400,12 @@ 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() {
|
||||||
curl --silent --location "${1}"
|
curl --disable --silent --location "${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download a JSON file from the web and pipe it to stdout
|
# Download a JSON file from the web and pipe it to stdout
|
||||||
function web_pipe_json() {
|
function web_pipe_json() {
|
||||||
curl --silent --location --header "Accept: application/json" "${1}"
|
curl --disable --silent --location --header "Accept: application/json" "${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download a file from the web
|
# Download a file from the web
|
||||||
|
|
@ -458,7 +458,7 @@ function web_get() {
|
||||||
echo "- URL: ${URL}"
|
echo "- URL: ${URL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! curl --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then
|
if ! curl --disable --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then
|
||||||
echo "ERROR! Failed to download ${URL} with curl."
|
echo "ERROR! Failed to download ${URL} with curl."
|
||||||
rm -f "${DIR}/${FILE}"
|
rm -f "${DIR}/${FILE}"
|
||||||
fi
|
fi
|
||||||
|
|
@ -470,7 +470,7 @@ function web_redirect() {
|
||||||
local URL="${1}"
|
local URL="${1}"
|
||||||
# Check for URL redirections
|
# Check for URL redirections
|
||||||
# Output to nonexistent directory so the download fails fast
|
# Output to nonexistent directory so the download fails fast
|
||||||
REDIRECT_URL=$(curl --silent --location --fail --write-out '%{url_effective}' --output /var/cache/${RANDOM}/${RANDOM} "${URL}")
|
REDIRECT_URL=$(curl --disable --silent --location --fail --write-out '%{url_effective}' --output /var/cache/${RANDOM}/${RANDOM} "${URL}")
|
||||||
if [ "${REDIRECT_URL}" != "${URL}" ]; then
|
if [ "${REDIRECT_URL}" != "${URL}" ]; then
|
||||||
echo "${REDIRECT_URL}"
|
echo "${REDIRECT_URL}"
|
||||||
else
|
else
|
||||||
|
|
@ -491,7 +491,7 @@ function web_check() {
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
curl --silent --location --head --output /dev/null --fail --connect-timeout 30 --max-time 30 --retry 3 "${HEADERS[@]}" "${URL}"
|
curl --disable --silent --location --head --output /dev/null --fail --connect-timeout 30 --max-time 30 --retry 3 "${HEADERS[@]}" "${URL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function zsync_get() {
|
function zsync_get() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue