summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2019-05-14 15:42:07 +0200
committerUrban Müller2019-05-14 15:42:07 +0200
commitddbbb2d0902f1d475522d2a3538a4409955f68b5 (patch)
tree53997aa9c5c21ee4e03e6dcd0ad540c7f5b2be98
parent050af2a7605376cdfd7f513e09929299eab7a69c (diff)
downloaditools-ddbbb2d0902f1d475522d2a3538a4409955f68b5.tar.gz
itools-ddbbb2d0902f1d475522d2a3538a4409955f68b5.tar.bz2
itools-ddbbb2d0902f1d475522d2a3538a4409955f68b5.zip
allow retries on 500 server errors
-rw-r--r--it_url.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class
index 4135789..12ac64a 100644
--- a/it_url.class
+++ b/it_url.class
@@ -131,7 +131,7 @@ function get($p=null, $timeout=5)
$result = $url->request($p + ['followlocation' => true]);
- if (!$result && $p['retries'] > 0 && $url->result < 400 && $url->result != 204)
+ if (!$result && $p['retries'] > 0 && !it::match('^(4..|204)$', $url->result))
{
usleep($p['retrysleep']*1000000);
$result = $url->get(array('retries' => $p['retries'] - 1) + $p);