aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-05-20 19:18:39 -0700
committerzotlabs <mike@macgirvin.com>2018-05-20 20:15:19 -0700
commitac8706e919d62a3a487fe3776e03160454ca8992 (patch)
treed01d94d46e32067c4948c3363f09be77c8900775
parent8611e7f8a62421d93df37f32753663ef0cced25a (diff)
downloadvolse-hubzilla-ac8706e919d62a3a487fe3776e03160454ca8992.tar.gz
volse-hubzilla-ac8706e919d62a3a487fe3776e03160454ca8992.tar.bz2
volse-hubzilla-ac8706e919d62a3a487fe3776e03160454ca8992.zip
pleroma does not return a valid JRD when given an accept header of application/jrd+json - it only returns a JRD when passed an accept header of application/json (ahead of anything else because XRD is served at the same endpoint)
-rw-r--r--include/network.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/network.php b/include/network.php
index ceba56e06..7e8f823a3 100644
--- a/include/network.php
+++ b/include/network.php
@@ -1216,7 +1216,7 @@ function webfinger_rfc7033($webbie, $zot = false) {
if(strpos($webbie,'@')) {
$lhs = substr($webbie,0,strpos($webbie,'@'));
$rhs = substr($webbie,strpos($webbie,'@')+1);
- $resource = 'acct:' . $webbie;
+ $resource = urlencode('acct:' . $webbie);
}
else {
$m = parse_url($webbie);
@@ -1234,7 +1234,7 @@ function webfinger_rfc7033($webbie, $zot = false) {
$counter = 0;
$s = z_fetch_url('https://' . $rhs . '/.well-known/webfinger?f=&resource=' . $resource . (($zot) ? '&zot=1' : ''),
- false, $counter, [ 'headers' => [ 'Accept: application/jrd+json, */*' ] ]);
+ false, $counter, [ 'headers' => [ 'Accept: application/jrd+json, application/json, */*' ] ]);
if($s['success']) {
$j = json_decode($s['body'], true);