]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
follow location on http get-requests
authorLukas Schauer <lukas@schauer.so>
Sat, 3 Feb 2018 21:03:58 +0000 (22:03 +0100)
committerLukas Schauer <lukas@schauer.so>
Sat, 3 Feb 2018 21:03:58 +0000 (22:03 +0100)
dehydrated

index 6ee7dc1a1183422fe55c19c93e2181fe5e329a1f..9b903ca3840832027c745de025939a696d250c2a 100755 (executable)
@@ -458,7 +458,7 @@ http_request() {
     statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -s -w "%{http_code}" -o "${tempcont}" "${2}" -I)"
     curlret="${?}"
   elif [[ "${1}" = "get" ]]; then
-    statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -s -w "%{http_code}" -o "${tempcont}" "${2}")"
+    statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -L -s -w "%{http_code}" -o "${tempcont}" "${2}")"
     curlret="${?}"
   elif [[ "${1}" = "post" ]]; then
     statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -s -w "%{http_code}" -o "${tempcont}" "${2}" -d "${3}")"