fix #2478 - ensure all XRD documents get proper content-type headers

This commit is contained in:
James Walker 2010-08-02 14:47:13 -04:00
parent eaef724c49
commit 56294016a7
2 changed files with 2 additions and 3 deletions

View File

@ -35,14 +35,13 @@ class HostMetaAction extends Action
$url = common_local_url('userxrd'); $url = common_local_url('userxrd');
$url.= '?uri={uri}'; $url.= '?uri={uri}';
$xrd = new XRD();
$xrd = new XRD(); $xrd = new XRD();
$xrd->host = $domain; $xrd->host = $domain;
$xrd->links[] = array('rel' => Discovery::LRDD_REL, $xrd->links[] = array('rel' => Discovery::LRDD_REL,
'template' => $url, 'template' => $url,
'title' => array('Resource Descriptor')); 'title' => array('Resource Descriptor'));
header('Content-type: application/xrd+xml');
print $xrd->toXML(); print $xrd->toXML();
} }
} }

View File

@ -101,7 +101,7 @@ class XrdAction extends Action
$xrd->links[] = array('rel' => 'http://ostatus.org/schema/1.0/subscribe', $xrd->links[] = array('rel' => 'http://ostatus.org/schema/1.0/subscribe',
'template' => $url ); 'template' => $url );
header('Content-type: text/xml'); header('Content-type: application/xrd+xml');
print $xrd->toXML(); print $xrd->toXML();
} }