]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/HTTPSignature.php
Display interaction data for Diaspora accounts
[friendica.git] / src / Util / HTTPSignature.php
index f11dbcceb4c20c73505d0fe9aa007e5a774f2721..f7ede9225a8bbee75e4a939129d1d24c9918d507 100644 (file)
@@ -28,9 +28,9 @@ use Friendica\DI;
 use Friendica\Model\APContact;
 use Friendica\Model\Contact;
 use Friendica\Model\User;
-use Friendica\Network\CurlResult;
-use Friendica\Network\HTTPClientOptions;
-use Friendica\Network\IHTTPResult;
+use Friendica\Network\HTTPClient\Response\CurlResult;
+use Friendica\Network\HTTPClient\Client\HttpClientOptions;
+use Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses;
 
 /**
  * Implements HTTP Signatures per draft-cavage-http-signatures-07.
@@ -414,10 +414,10 @@ class HTTPSignature
         *                         'nobody' => only return the header
         *                         'cookiejar' => path to cookie jar file
         *
-        * @return IHTTPResult CurlResult
+        * @return \Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses CurlResult
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function fetchRaw($request, $uid = 0, $opts = ['accept_content' => ['application/activity+json', 'application/ld+json']])
+       public static function fetchRaw($request, $uid = 0, $opts = ['accept_content' => ['application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"']])
        {
                $header = [];
 
@@ -450,7 +450,7 @@ class HTTPSignature
                }
 
                $curl_opts                             = $opts;
-               $curl_opts[HTTPClientOptions::HEADERS] = $header;
+               $curl_opts[HttpClientOptions::HEADERS] = $header;
 
                if (!empty($opts['nobody'])) {
                        $curlResult = DI::httpClient()->head($request, $curl_opts);
@@ -476,7 +476,7 @@ class HTTPSignature
        public static function getSigner($content, $http_headers)
        {
                if (empty($http_headers['HTTP_SIGNATURE'])) {
-                       Logger::info('No HTTP_SIGNATURE header');
+                       Logger::debug('No HTTP_SIGNATURE header');
                        return false;
                }