From 517c7483d1b55fcc78b1d69e8ffd7de763faa772 Mon Sep 17 00:00:00 2001 From: James Walker Date: Mon, 2 Aug 2010 13:23:55 -0400 Subject: move to rel="salmon" (per latest spec) --- plugins/OStatus/lib/xrdaction.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/OStatus/lib/xrdaction.php') diff --git a/plugins/OStatus/lib/xrdaction.php b/plugins/OStatus/lib/xrdaction.php index f1a56e0a8..71c70b96e 100644 --- a/plugins/OStatus/lib/xrdaction.php +++ b/plugins/OStatus/lib/xrdaction.php @@ -76,6 +76,9 @@ class XrdAction extends Action $salmon_url = common_local_url('usersalmon', array('id' => $this->user->id)); + $xrd->links[] = array('rel' => Salmon::REL_SALMON, + 'href' => $salmon_url); + // XXX : Deprecated - to be removed. $xrd->links[] = array('rel' => Salmon::NS_REPLIES, 'href' => $salmon_url); -- cgit v1.2.3-54-g00ecf From 56294016a753c43c366bf4680da28a17cccc21d5 Mon Sep 17 00:00:00 2001 From: James Walker Date: Mon, 2 Aug 2010 14:47:13 -0400 Subject: fix #2478 - ensure all XRD documents get proper content-type headers --- plugins/OStatus/actions/hostmeta.php | 3 +-- plugins/OStatus/lib/xrdaction.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/OStatus/lib/xrdaction.php') diff --git a/plugins/OStatus/actions/hostmeta.php b/plugins/OStatus/actions/hostmeta.php index 6d35ada6c..8ca07f916 100644 --- a/plugins/OStatus/actions/hostmeta.php +++ b/plugins/OStatus/actions/hostmeta.php @@ -35,14 +35,13 @@ class HostMetaAction extends Action $url = common_local_url('userxrd'); $url.= '?uri={uri}'; - $xrd = new XRD(); - $xrd = new XRD(); $xrd->host = $domain; $xrd->links[] = array('rel' => Discovery::LRDD_REL, 'template' => $url, 'title' => array('Resource Descriptor')); + header('Content-type: application/xrd+xml'); print $xrd->toXML(); } } diff --git a/plugins/OStatus/lib/xrdaction.php b/plugins/OStatus/lib/xrdaction.php index 71c70b96e..d8cf648d6 100644 --- a/plugins/OStatus/lib/xrdaction.php +++ b/plugins/OStatus/lib/xrdaction.php @@ -101,7 +101,7 @@ class XrdAction extends Action $xrd->links[] = array('rel' => 'http://ostatus.org/schema/1.0/subscribe', 'template' => $url ); - header('Content-type: text/xml'); + header('Content-type: application/xrd+xml'); print $xrd->toXML(); } -- cgit v1.2.3-54-g00ecf