X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FHTTPSignature.php;h=3e22820e5c4e96349035b8561c8773e147d15285;hb=71cf72cc8bde161471b2294c675fb0500dd48399;hp=663c5a752adec86b13c6bbf29a622b83f9b2ad8a;hpb=4236a9a1059411c1d6483f772af30322ce713f0e;p=friendica.git diff --git a/src/Util/HTTPSignature.php b/src/Util/HTTPSignature.php index 663c5a752a..3e22820e5c 100644 --- a/src/Util/HTTPSignature.php +++ b/src/Util/HTTPSignature.php @@ -1,6 +1,6 @@ getMethod()).' '.$_SERVER['REQUEST_URI']; foreach ($_SERVER as $k => $v) { if (strpos($k, 'HTTP_') === 0) { @@ -414,10 +412,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 +448,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); @@ -493,7 +491,7 @@ class HTTPSignature } $headers = []; - $headers['(request-target)'] = strtolower($http_headers['REQUEST_METHOD']) . ' ' . parse_url($http_headers['REQUEST_URI'], PHP_URL_PATH); + $headers['(request-target)'] = strtolower(DI::args()->getMethod()) . ' ' . parse_url($http_headers['REQUEST_URI'], PHP_URL_PATH); // First take every header foreach ($http_headers as $k => $v) {