forked from GNUsocial/gnu-social
fix #2478 - ensure all XRD documents get proper content-type headers
This commit is contained in:
parent
eaef724c49
commit
56294016a7
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user