diff Sitemap.inc @ 91:1d4c980f4255

Change the way headers are set. Disabled validation for non-html pages.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Thu, 18 Oct 2012 00:28:48 +0200
parents b9654b9c4a66
children 8aadd7a23b68
line wrap: on
line diff
--- a/Sitemap.inc	Wed Oct 17 21:23:02 2012 +0200
+++ b/Sitemap.inc	Thu Oct 18 00:28:48 2012 +0200
@@ -33,6 +33,11 @@
     return false;
   }
 
+  function mayValidate()
+  {
+    return false;
+  }
+
   function generateContent() {
     /// The final output variable
     $out = '<?xml version="1.0" encoding="UTF-8"?>';
@@ -104,7 +109,7 @@
     $out .= '</urlset>';
 
     $res = new PageContent($out);
-    $res->addHeader('Content-type: application/xml');
+    $res->setHeader('Content-type', 'application/xml');
     return $res;
   }
 }