diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-04-17 19:00:15 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-04-17 19:00:15 +0200 |
commit | c0794a83b490031590bc1488b3f15a0cb4f7a2e4 (patch) | |
tree | 636280a41c30bc1723ac62e90ae7fedb4d7cb12f /include | |
parent | dcd636f7be5b3f2f6fa32bc77cec4230e5bfcd2d (diff) | |
parent | 02763811b35eb6be41db8071acb4e07725cac697 (diff) | |
download | volse-hubzilla-c0794a83b490031590bc1488b3f15a0cb4f7a2e4.tar.gz volse-hubzilla-c0794a83b490031590bc1488b3f15a0cb4f7a2e4.tar.bz2 volse-hubzilla-c0794a83b490031590bc1488b3f15a0cb4f7a2e4.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-rw-r--r-- | include/network.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/include/network.php b/include/network.php index 747b46877..897fbccd6 100644 --- a/include/network.php +++ b/include/network.php @@ -1240,16 +1240,9 @@ function webfinger_rfc7033($webbie, $zot = false) { } logger('fetching url from resource: ' . $rhs . ':' . $webbie); - // The default curl Accept: header is */*, which is incorrectly handled by Mastodon servers - // and results in a 406 (Not Acceptable) response, and will also incorrectly produce an XML - // document if you use 'application/jrd+json, */*'. We could set this to application/jrd+json, - // but some test webfinger servers may not explicitly set the content type and they would be - // blocked. The best compromise until Mastodon is fixed is to remove the Accept header which is - // accomplished by setting it to nothing. - $counter = 0; $s = z_fetch_url('https://' . $rhs . '/.well-known/webfinger?f=&resource=' . $resource . (($zot) ? '&zot=1' : ''), - false, $counter, [ 'headers' => [ 'Accept:' ] ]); + false, $counter, [ 'headers' => [ 'Accept: application/jrd+json, */*' ] ]); if($s['success']) { $j = json_decode($s['body'], true); |