]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
fixed small logic bug
authorLukas Schauer <lukas@schauer.so>
Wed, 9 Oct 2019 00:05:54 +0000 (02:05 +0200)
committerLukas Schauer <lukas@schauer.so>
Wed, 9 Oct 2019 00:05:54 +0000 (02:05 +0200)
dehydrated

index 624cd858c20a71235905547af4c1eedd89a001fd..aacb66bf5fbbc9d345147b455b5c02920105b226 100755 (executable)
@@ -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="${?}"