]> git.mxchange.org Git - friendica.git/blobdiff - mod/redir.php
Merge pull request #11575 from annando/issue-11469
[friendica.git] / mod / redir.php
index e96a58b63a965f50ef70016481be5b38c46f3571..ba1b7e13b6a9f45cfe957c57816e31f553942f56 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -27,6 +27,8 @@ use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\Profile;
+use Friendica\Network\HTTPClient\Client\HttpClientAccept;
+use Friendica\Network\HTTPClient\Client\HttpClientOptions;
 use Friendica\Util\Strings;
 
 function redir_init(App $a) {
@@ -142,7 +144,7 @@ function redir_magic($a, $cid, $url)
        }
 
        // Test for magic auth on the target system
-       $serverret = DI::httpClient()->get($basepath . '/magic');
+       $serverret = DI::httpClient()->head($basepath . '/magic', [HttpClientOptions::ACCEPT_CONTENT => HttpClientAccept::HTML]);
        if ($serverret->isSuccess()) {
                $separator = strpos($target_url, '?') ? '&' : '?';
                $target_url .= $separator . 'zrl=' . urlencode($visitor) . '&addr=' . urlencode($contact_url);