From a5fde931f8602ec1334e8ad2e3471c6c7ceeb58d Mon Sep 17 00:00:00 2001 From: Lukas Schauer Date: Sun, 29 Jan 2017 22:42:02 +0100 Subject: [PATCH] curl: use custom user agent --- dehydrated | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dehydrated b/dehydrated index a578955..0d1ada1 100755 --- a/dehydrated +++ b/dehydrated @@ -360,13 +360,13 @@ http_request() { set +e if [[ "${1}" = "head" ]]; then - statuscode="$(curl ${ip_version:-} -s -w "%{http_code}" -o "${tempcont}" "${2}" -I)" + statuscode="$(curl ${ip_version:-} -A "dehydrated" -s -w "%{http_code}" -o "${tempcont}" "${2}" -I)" curlret="${?}" elif [[ "${1}" = "get" ]]; then - statuscode="$(curl ${ip_version:-} -s -w "%{http_code}" -o "${tempcont}" "${2}")" + statuscode="$(curl ${ip_version:-} -A "dehydrated" -s -w "%{http_code}" -o "${tempcont}" "${2}")" curlret="${?}" elif [[ "${1}" = "post" ]]; then - statuscode="$(curl ${ip_version:-} -s -w "%{http_code}" -o "${tempcont}" "${2}" -d "${3}")" + statuscode="$(curl ${ip_version:-} -A "dehydrated" -s -w "%{http_code}" -o "${tempcont}" "${2}" -d "${3}")" curlret="${?}" else set -e