check_curl print
This commit is contained in:
parent
05892276bf
commit
e119301f2b
|
@ -75,13 +75,14 @@ for value in "${values[@]}"; do
|
|||
HEADER_ARGS+=' -H "'$value'" '
|
||||
done
|
||||
|
||||
TMP_ERROR_LOG=$(mktemp)
|
||||
TMP_RESPONSE=$(mktemp)
|
||||
|
||||
if $PRINT_ONLY; then
|
||||
echo "curl --output \"$TMP_RESPONSE\" -s -w \"%{http_code}\n%{time_total}\" $(echo "${HEADER_ARGS[@]}" | tr -s ' ') $FOLLOW_REDIRECTS $INSECURE $RESOLVE $URL"
|
||||
printf "%s" "curl --output \"$TMP_RESPONSE\" -s -w \"%{http_code}\n%{time_total}\" $(echo "${HEADER_ARGS[@]}" | tr -s ' ') $FOLLOW_REDIRECTS $INSECURE $RESOLVE $URL"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
TMP_ERROR_LOG=$(mktemp)
|
||||
TMP_RESPONSE=$(mktemp)
|
||||
RESPONSE=$(curl --output "$TMP_RESPONSE" -s -w "%{http_code}\n%{time_total}" $(echo "${HEADER_ARGS[@]}" | tr -s ' ') $FOLLOW_REDIRECTS $INSECURE $RESOLVE $URL 2>"$TMP_ERROR_LOG")
|
||||
|
||||
# shellcheck disable=SC2181
|
||||
|
|
Loading…
Reference in New Issue