6 |
curlret="${?}" |
curlret="${?}" |
7 |
elif [[ "${1}" = "get" ]]; then |
elif [[ "${1}" = "get" ]]; then |
8 |
- statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -s -w "%{http_code}" -o "${tempcont}" "${2}")" |
- statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -s -w "%{http_code}" -o "${tempcont}" "${2}")" |
9 |
+ statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -L s -w "%{http_code}" -o "${tempcont}" "${2}")" |
+ statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -L -s -w "%{http_code}" -o "${tempcont}" "${2}")" |
10 |
curlret="${?}" |
curlret="${?}" |
11 |
elif [[ "${1}" = "post" ]]; then |
elif [[ "${1}" = "post" ]]; then |
12 |
statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -s -w "%{http_code}" -o "${tempcont}" "${2}" -d "${3}")" |
statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -s -w "%{http_code}" -o "${tempcont}" "${2}" -d "${3}")" |