]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix #2478 - ensure all XRD documents get proper content-type headers
authorJames Walker <walkah@walkah.net>
Mon, 2 Aug 2010 18:47:13 +0000 (14:47 -0400)
committerJames Walker <walkah@walkah.net>
Mon, 2 Aug 2010 18:47:13 +0000 (14:47 -0400)
plugins/OStatus/actions/hostmeta.php
plugins/OStatus/lib/xrdaction.php

index 6d35ada6c69ef70221df44afcca79fc264b0ec5d..8ca07f9165535e493d52eb3b598ca59057051fac 100644 (file)
@@ -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();
     }
 }
index 71c70b96e8493e91256da45ae1314a41f831b99a..d8cf648d6ded9cf5fa7c1c4b80f479e28308a898 100644 (file)
@@ -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();
     }