fixed small logic bug

This commit is contained in:
Lukas Schauer
2019-10-09 02:05:54 +02:00
parent 018254974c
commit 946e5712ba

View File

@@ -530,8 +530,8 @@ http_request() {
set +e
if [[ "${1}" = "head" ]]; then
statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -A "dehydrated/${VERSION} curl/${CURL_VERSION}" -s -w "%{http_code}" -o "${tempcont}" "${2}" -I)"
touch "${tempheaders}"
curlret="${?}"
touch "${tempheaders}"
elif [[ "${1}" = "get" ]]; then
statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -A "dehydrated/${VERSION} curl/${CURL_VERSION}" -L -s -w "%{http_code}" -o "${tempcont}" -D "${tempheaders}" "${2}")"
curlret="${?}"