Don't send "accept" when we accept anything
This commit is contained in:
parent
ed0b300113
commit
4bc3e8c141
|
@ -58,7 +58,7 @@ class ExternalResource implements IStorage
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
$fetchResult = HTTPSignature::fetchRaw($data->url, $data->uid);
|
$fetchResult = HTTPSignature::fetchRaw($data->url, $data->uid, ['accept_content' => '']);
|
||||||
if ($fetchResult->isSuccess()) {
|
if ($fetchResult->isSuccess()) {
|
||||||
return $fetchResult->getBody();
|
return $fetchResult->getBody();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -75,7 +75,7 @@ class Proxy extends BaseModule
|
||||||
$request['url'] = str_replace(' ', '+', $request['url']);
|
$request['url'] = str_replace(' ', '+', $request['url']);
|
||||||
|
|
||||||
// Fetch the content with the local user
|
// 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();
|
$img_str = $fetchResult->getBody();
|
||||||
|
|
||||||
if (!$fetchResult->isSuccess() || empty($img_str)) {
|
if (!$fetchResult->isSuccess() || empty($img_str)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user