]> git.mxchange.org Git - friendica.git/commitdiff
Don't send "accept" when we accept anything
authorMichael <heluecht@pirati.ca>
Fri, 6 Aug 2021 04:02:22 +0000 (04:02 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 6 Aug 2021 04:02:22 +0000 (04:02 +0000)
src/Model/Storage/ExternalResource.php
src/Module/Proxy.php

index 5c78e6d546360c2fe035cd78266b8a8ee99c81af..0e758c706251f2b0b86622f7b5050cf8ac599b27 100644 (file)
@@ -58,7 +58,7 @@ class ExternalResource implements IStorage
                        return "";
                }
 
-               $fetchResult = HTTPSignature::fetchRaw($data->url, $data->uid);
+               $fetchResult = HTTPSignature::fetchRaw($data->url, $data->uid, ['accept_content' => '']);
                if ($fetchResult->isSuccess()) {
                        return $fetchResult->getBody();
                } else {
index b1683e8f5b4082e4c76e129c9e63fa0747ddc4bc..04fe00db1248a8ed07e726c525b256f9b75986a7 100644 (file)
@@ -75,7 +75,7 @@ class Proxy extends BaseModule
                $request['url'] = str_replace(' ', '+', $request['url']);
 
                // Fetch the content with the local user
-               $fetchResult = HTTPSignature::fetchRaw($request['url'], local_user(), ['timeout' => 10]);
+               $fetchResult = HTTPSignature::fetchRaw($request['url'], local_user(), ['accept_content' => '', 'timeout' => 10]);
                $img_str = $fetchResult->getBody();
 
                if (!$fetchResult->isSuccess() || empty($img_str)) {