Merge 011d39ae23515ed1585053c68b9eefd629d97ae9 into c53da1ef7264f96eddefcc37c8e3361591f3b266

This commit is contained in:
David Mcanulty 2016-05-03 18:10:06 +00:00
commit 7605816eec

11
acme.sh
View File

@ -577,8 +577,14 @@ _post() {
CURL="$CURL --dump-header $HTTP_HEADER " CURL="$CURL --dump-header $HTTP_HEADER "
if [ "$needbase64" ] ; then if [ "$needbase64" ] ; then
response="$($CURL -A "User-Agent: $USER_AGENT" -X POST --data "$body" $url | _base64)" response="$($CURL -A "User-Agent: $USER_AGENT" -X POST --data "$body" $url | _base64)"
if [ $? -gt 0 ] ;then
_err "Curl failed with exit code $?, trying running script with --debug 2"
fi
else else
response="$($CURL -A "User-Agent: $USER_AGENT" -X POST --data "$body" $url)" response="$($CURL -A "User-Agent: $USER_AGENT" -X POST --data "$body" $url)"
if [ $? -gt 0 ] ;then
_err "Curl failed with exit code $?, trying running script with --debug 2"
fi
fi fi
else else
if [ "$needbase64" ] ; then if [ "$needbase64" ] ; then
@ -612,6 +618,9 @@ _get() {
fi fi
fi fi
ret=$? ret=$?
if [ $ret -gt 0 ] ;then
_err "URL get failed with exit code $ret, trying running script with --debug 2"
fi
return $ret return $ret
} }
@ -840,7 +849,7 @@ _initpath() {
dp="$LE_WORKING_DIR/curl.dump" dp="$LE_WORKING_DIR/curl.dump"
CURL="curl -L --silent" CURL="curl -L --silent"
if [ "$DEBUG" ] && [ "$DEBUG" -ge "2" ] ; then if [ "$DEBUG" ] && [ "$DEBUG" -ge "2" ] ; then
CURL="$CURL -L --trace-ascii $dp " CURL="curl -L --trace-ascii $dp "
fi fi
_DEFAULT_ACCOUNT_KEY_PATH="$LE_WORKING_DIR/account.key" _DEFAULT_ACCOUNT_KEY_PATH="$LE_WORKING_DIR/account.key"