Browse Source
Merge pull request #4544 from NCDGHA/bugfix/issue_4543_fix_retry-after
Fix Retry-After handling
pull/4546/merge
neil
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
acme.sh
|
@ -2229,8 +2229,8 @@ _send_signed_request() { |
|
|
_debug3 _body "$_body" |
|
|
_debug3 _body "$_body" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
_retryafter=$(echo "$responseHeaders" | grep -i "^Retry-After *:" | cut -d : -f 2 | tr -d ' ' | tr -d '\r') |
|
|
|
|
|
if [ "$code" = '503' ] || [ "$_retryafter" ]; then |
|
|
|
|
|
|
|
|
_retryafter=$(echo "$responseHeaders" | grep -i "^Retry-After *: *[0-9]\+ *" | cut -d : -f 2 | tr -d ' ' | tr -d '\r') |
|
|
|
|
|
if [ "$code" = '503' ]; then |
|
|
_sleep_overload_retry_sec=$_retryafter |
|
|
_sleep_overload_retry_sec=$_retryafter |
|
|
if [ -z "$_sleep_overload_retry_sec" ]; then |
|
|
if [ -z "$_sleep_overload_retry_sec" ]; then |
|
|
_sleep_overload_retry_sec=5 |
|
|
_sleep_overload_retry_sec=5 |
|
|