Browse Source

append --fail-with-body argument to curl if supported

pull/4448/head
PMExtra 2 years ago
parent
commit
0cafc00c4f
  1. 5
      acme.sh

5
acme.sh

@ -1855,6 +1855,11 @@ _inithttp() {
if _contains "$(curl --help 2>&1)" "--globoff"; then if _contains "$(curl --help 2>&1)" "--globoff"; then
_ACME_CURL="$_ACME_CURL -g " _ACME_CURL="$_ACME_CURL -g "
fi fi
#from curl 7.76: return fail on HTTP errors but keep the body
if [ "$_ACME_CURL" ] && _contains "$($_ACME_CURL --help http)" "--fail-with-body"; then
_ACME_CURL="$_ACME_CURL --fail-with-body "
fi
fi fi
if [ -z "$_ACME_WGET" ] && _exists "wget"; then if [ -z "$_ACME_WGET" ] && _exists "wget"; then

Loading…
Cancel
Save