requeue deliveries on 503 errors which have 'retry-after' headers

This commit is contained in:
Friendika
2011-09-27 19:27:47 -07:00
parent 75af366122
commit 4f9c072d66
4 changed files with 9 additions and 2 deletions

View File

@@ -1042,6 +1042,9 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
if((! $curl_stat) || (! strlen($xml)))
return(-1); // timed out
if(($curl_stat == 503) && (stristr($a->get_curl_headers(),'retry-after')))
return(-1);
if(strpos($xml,'<?xml') === false) {
logger('dfrn_deliver: phase 2: no valid XML returned');
logger('dfrn_deliver: phase 2: returned XML: ' . $xml, LOGGER_DATA);