]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/plugins/SyjContentType.php
set charset in default content-type http header
[syj.git] / application / controllers / plugins / SyjContentType.php
diff --git a/application/controllers/plugins/SyjContentType.php b/application/controllers/plugins/SyjContentType.php
new file mode 100644 (file)
index 0000000..782b0f2
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+/*  This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
+    and is published under the AGPL license. */
+
+class Syj_Controllers_Plugins_SyjContentType extends Zend_Controller_Plugin_Abstract
+{
+    public function preDispatch(Zend_Controller_Request_Abstract $request) {
+        // set default content-type
+        $response = Zend_Controller_Front::getInstance()->getResponse();
+        $response->setHeader('Content-Type', 'text/html; charset=utf-8', true);
+    }
+}