]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/DFRN.php
Merge pull request #10633 from nupplaphil/task/httprequest_optimiziations
[friendica.git] / src / Protocol / DFRN.php
index 832e2bde23f7952c1dd658cef1c61760c4953b49..141bce54270561107a4234b5a2102f7327baacc7 100644 (file)
@@ -976,7 +976,7 @@ class DFRN
 
                $content_type = ($public_batch ? "application/magic-envelope+xml" : "application/json");
 
-               $postResult = DI::httpRequest()->post($dest_url, $envelope, ["Content-Type: " . $content_type]);
+               $postResult = DI::httpRequest()->post($dest_url, $envelope, ['Content-Type' => $content_type]);
                $xml = $postResult->getBody();
 
                $curl_stat = $postResult->getReturnCode();
@@ -985,7 +985,7 @@ class DFRN
                        return -9; // timed out
                }
 
-               if (($curl_stat == 503) && (stristr($postResult->getHeader(), 'retry-after'))) {
+               if (($curl_stat == 503) && $postResult->inHeader('retry-after')) {
                        return -10;
                }