diff options
author | James Walker <walkah@walkah.net> | 2010-08-02 14:47:13 -0400 |
---|---|---|
committer | James Walker <walkah@walkah.net> | 2010-08-02 14:47:13 -0400 |
commit | 56294016a753c43c366bf4680da28a17cccc21d5 (patch) | |
tree | 2f10a8ca904c7cee6881fc94faa4583d852827df | |
parent | eaef724c4912ab51a1c6ebc14f1fef382b7ac2a1 (diff) |
fix #2478 - ensure all XRD documents get proper content-type headers
-rw-r--r-- | plugins/OStatus/actions/hostmeta.php | 3 | ||||
-rw-r--r-- | 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 6d35ada6c..8ca07f916 100644 --- a/plugins/OStatus/actions/hostmeta.php +++ b/plugins/OStatus/actions/hostmeta.php @@ -36,13 +36,12 @@ class HostMetaAction extends Action $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(); } |