From 56294016a753c43c366bf4680da28a17cccc21d5 Mon Sep 17 00:00:00 2001 From: James Walker Date: Mon, 2 Aug 2010 14:47:13 -0400 Subject: [PATCH] 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(-) diff --git a/plugins/OStatus/actions/hostmeta.php b/plugins/OStatus/actions/hostmeta.php index 6d35ada6c6..8ca07f9165 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 71c70b96e8..d8cf648d6d 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(); } -- 2.39.5