]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
include content-type in post requests (fixes #491)
authorLukas Schauer <lukas@schauer.so>
Fri, 9 Mar 2018 11:25:37 +0000 (12:25 +0100)
committerLukas Schauer <lukas@schauer.so>
Fri, 9 Mar 2018 11:25:37 +0000 (12:25 +0100)
dehydrated

index 362c4265c4960a8571ab8bb3e45e44a83dbaf9fb..5e5d162e474339fc45254940217042a20e203c8c 100755 (executable)
@@ -506,7 +506,7 @@ http_request() {
     statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -A "dehydr4ted/${VERSION} curl/${CURL_VERSION}" -L -s -w "%{http_code}" -o "${tempcont}" -D "${tempheaders}" "${2}")"
     curlret="${?}"
   elif [[ "${1}" = "post" ]]; then
-    statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -A "dehydr4ted/${VERSION} curl/${CURL_VERSION}" -s -w "%{http_code}" -o "${tempcont}" "${2}" -D "${tempheaders}" -d "${3}")"
+    statuscode="$(curl ${ip_version:-} ${CURL_OPTS} -A "dehydr4ted/${VERSION} curl/${CURL_VERSION}" -s -w "%{http_code}" -o "${tempcont}" "${2}" -D "${tempheaders}" -H 'Content-Type: application/jose+json' -d "${3}")"
     curlret="${?}"
   else
     set -e