resources.frontController.actionhelperpaths.Syj_Controller_Action_Helper = APPLICATION_PATH "/controllers/helpers"
resources.frontController.plugins.locale = "Syj_Controllers_Plugins_SyjLocale"
resources.frontController.plugins.loggeduser = "Syj_Controllers_Plugins_SyjLoggedUser"
+resources.frontController.plugins.contenttype = "Syj_Controllers_Plugins_SyjContentType"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.db.adapter = "Pdo_Pgsql"
; i18n
public function postDispatch() {
$response = $this->getResponse();
- $response->setHeader('Content-Type', $this->_contentType)
- ->setHeader('Content-Length', strlen($this->_body));
+ $response->setHeader('Content-Type', $this->_contentType, true)
+ ->setHeader('Content-Length', strlen($this->_body), true);
if ($this->_checkIfNoneMatch) {
$request = $this->getRequest();
--- /dev/null
+<?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);
+ }
+}