Skip to content

Commit 70f4cad

Browse files
committed
Fix Retry-After handling
- closes #4543
1 parent ce629e8 commit 70f4cad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

acme.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,8 +2229,8 @@ _send_signed_request() {
22292229
_debug3 _body "$_body"
22302230
fi
22312231

2232-
_retryafter=$(echo "$responseHeaders" | grep -i "^Retry-After *:" | cut -d : -f 2 | tr -d ' ' | tr -d '\r')
2233-
if [ "$code" = '503' ] || [ "$_retryafter" ]; then
2232+
_retryafter=$(echo "$responseHeaders" | grep -i "^Retry-After *: *[0-9]\+ *" | cut -d : -f 2 | tr -d ' ' | tr -d '\r')
2233+
if [ "$code" = '503' ]; then
22342234
_sleep_overload_retry_sec=$_retryafter
22352235
if [ -z "$_sleep_overload_retry_sec" ]; then
22362236
_sleep_overload_retry_sec=5

0 commit comments

Comments
 (0)