forked from friendica/friendica-addons
Merge pull request #1032 from nupplaphil/task/psr7_remove_binary
[various] Remove $binary flag for HTTPRequest
This commit is contained in:
commit
29586d3498
|
@ -155,7 +155,7 @@ function mailstream_do_images($a, &$item, &$attachments) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$cookiejar = tempnam(get_temppath(), 'cookiejar-mailstream-');
|
$cookiejar = tempnam(get_temppath(), 'cookiejar-mailstream-');
|
||||||
$curlResult = DI::httpRequest()->fetchFull($url, true, 0, '', $cookiejar);
|
$curlResult = DI::httpRequest()->fetchFull($url, 0, '', $cookiejar);
|
||||||
$attachments[$url] = [
|
$attachments[$url] = [
|
||||||
'data' => $curlResult->getBody(),
|
'data' => $curlResult->getBody(),
|
||||||
'guid' => hash("crc32", $url),
|
'guid' => hash("crc32", $url),
|
||||||
|
|
|
@ -1590,7 +1590,7 @@ function pumpio_fetchallcomments(App $a, $uid, $id)
|
||||||
|
|
||||||
function pumpio_reachable($url)
|
function pumpio_reachable($url)
|
||||||
{
|
{
|
||||||
return DI::httpRequest()->get($url, false, ['timeout' => 10])->isSuccess();
|
return DI::httpRequest()->get($url, ['timeout' => 10])->isSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1453,7 +1453,7 @@ function statusnet_convertmsg(App $a, $body)
|
||||||
} elseif ($oembed_data->type != "link") {
|
} elseif ($oembed_data->type != "link") {
|
||||||
$body = str_replace($search, "[url=" . $expanded_url . "]" . $expanded_url . "[/url]", $body);
|
$body = str_replace($search, "[url=" . $expanded_url . "]" . $expanded_url . "[/url]", $body);
|
||||||
} else {
|
} else {
|
||||||
$img_str = DI::httpRequest()->fetch($expanded_url, true, 4);
|
$img_str = DI::httpRequest()->fetch($expanded_url, 4);
|
||||||
|
|
||||||
$tempfile = tempnam(get_temppath(), "cache");
|
$tempfile = tempnam(get_temppath(), "cache");
|
||||||
file_put_contents($tempfile, $img_str);
|
file_put_contents($tempfile, $img_str);
|
||||||
|
|
|
@ -1326,7 +1326,7 @@ function twitter_expand_entities($body, stdClass $status, $picture)
|
||||||
} elseif ($oembed_data->type != 'link') {
|
} elseif ($oembed_data->type != 'link') {
|
||||||
$replace = '[url=' . $expanded_url . ']' . $url->display_url . '[/url]';
|
$replace = '[url=' . $expanded_url . ']' . $url->display_url . '[/url]';
|
||||||
} else {
|
} else {
|
||||||
$img_str = DI::httpRequest()->fetch($final_url, true, 4);
|
$img_str = DI::httpRequest()->fetch($final_url, 4);
|
||||||
|
|
||||||
$tempfile = tempnam(get_temppath(), 'cache');
|
$tempfile = tempnam(get_temppath(), 'cache');
|
||||||
file_put_contents($tempfile, $img_str);
|
file_put_contents($tempfile, $img_str);
|
||||||
|
|
Loading…
Reference in a new issue