From 83846e49e0e8695b5cca9a6663b34fffe2dc67cb Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Mon, 24 Jun 2013 17:03:08 +0200 Subject: [PATCH 1/2] [WebProfiler] fix content-type parameter --- .../WebProfilerBundle/Controller/ExceptionController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php index 6d10ab641b72d..fafd985ec3fe2 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php @@ -84,10 +84,10 @@ public function cssAction($token) if (!$this->templateExists($template)) { $handler = new ExceptionHandler(); - return new Response($handler->getStylesheet($exception)); + return new Response($handler->getStylesheet($exception), 200, array('Content-Type' => 'text/css')); } - return new Response($this->twig->render('@WebProfiler/Collector/exception.css.twig'), 200, 'text/css'); + return new Response($this->twig->render('@WebProfiler/Collector/exception.css.twig'), 200, array('Content-Type' => 'text/css')); } protected function getTemplate() From 03df80e08fb937961dbd25d521be2ef5984b7afd Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Mon, 24 Jun 2013 17:05:54 +0200 Subject: [PATCH 2/2] [HttpFoundation] clarify typehint in Response that is needed due its presence in ResponseHeaderBag --- src/Symfony/Component/HttpFoundation/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 6913a5d031d2c..de7a694e9471e 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -135,7 +135,7 @@ class Response * * @api */ - public function __construct($content = '', $status = 200, $headers = array()) + public function __construct($content = '', $status = 200, array $headers = array()) { $this->headers = new ResponseHeaderBag($headers); $this->setContent($content);