support Retry-After header

https://github.com/acmesh-official/acme.sh/issues/2939
This commit is contained in:
neil 2020-05-19 22:34:19 +08:00
parent cc78ab4855
commit 59fd48cfe2

View File

@ -4517,6 +4517,12 @@ $_authorizations_map"
_info "Pending"
elif [ "$status" = "processing" ]; then
_info "Processing"
_retryafter=$(echo "$responseHeaders" | grep -i "^Retry-After *:" | cut -d : -f 2 | tr -d ' ')
_debug "_retryafter" "$_retryafter"
if [ "$_retryafter" ]; then
_info "Retry after: $_retryafter"
_sleep $_retryafter
fi
else
_err "$d:Verify error:$response"
_clearupwebbroot "$_currentRoot" "$removelevel" "$token"