1
0
Fork 0

Remove accept parameter for head/post again

This commit is contained in:
Philipp Holzer 2022-04-03 19:33:09 +02:00
commit 04866195b4
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
12 changed files with 54 additions and 57 deletions

View file

@ -42,7 +42,6 @@ use Friendica\Model\Post;
use Friendica\Model\Profile;
use Friendica\Model\Tag;
use Friendica\Model\User;
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
use Friendica\Network\Probe;
use Friendica\Util\Crypto;
use Friendica\Util\DateTimeFormat;
@ -1014,7 +1013,7 @@ class DFRN
$content_type = ($public_batch ? "application/magic-envelope+xml" : "application/json");
$postResult = DI::httpClient()->post($dest_url, $envelope, HttpClientAccept::DEFAULT, ['Content-Type' => $content_type]);
$postResult = DI::httpClient()->post($dest_url, $envelope, ['Content-Type' => $content_type]);
$xml = $postResult->getBody();
$curl_stat = $postResult->getReturnCode();

View file

@ -3018,7 +3018,7 @@ class Diaspora
if (!intval(DI::config()->get("system", "diaspora_test"))) {
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
$postResult = DI::httpClient()->post($dest_url . "/", $envelope, HttpClientAccept::DEFAULT, ['Content-Type' => $content_type]);
$postResult = DI::httpClient()->post($dest_url . "/", $envelope, ['Content-Type' => $content_type]);
$return_code = $postResult->getReturnCode();
} else {
Logger::notice("test_mode");

View file

@ -157,7 +157,7 @@ class Salmon
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
$postResult = DI::httpClient()->post($url, $salmon, HttpClientAccept::DEFAULT, [
$postResult = DI::httpClient()->post($url, $salmon, [
'Content-type' => 'application/magic-envelope+xml',
'Content-length' => strlen($salmon),
]);
@ -182,7 +182,7 @@ class Salmon
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
$postResult = DI::httpClient()->post($url, $salmon, HttpClientAccept::DEFAULT, [
$postResult = DI::httpClient()->post($url, $salmon, [
'Content-type' => 'application/magic-envelope+xml',
'Content-length' => strlen($salmon),
]);
@ -205,7 +205,7 @@ class Salmon
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
$postResult = DI::httpClient()->post($url, $salmon, HttpClientAccept::DEFAULT, [
$postResult = DI::httpClient()->post($url, $salmon, [
'Content-type' => 'application/magic-envelope+xml',
'Content-length' => strlen($salmon)]);
$return_code = $postResult->getReturnCode();