From 39532390e12a65817ac024a57868bd9c79aa851f Mon Sep 17 00:00:00 2001 From: Gregwar Date: Tue, 4 Dec 2012 10:57:52 +0100 Subject: [PATCH] [Controller] Setting Content-type to image/jpeg --- Controller/CaptchaController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Controller/CaptchaController.php b/Controller/CaptchaController.php index 0a1e35e..7684ac2 100644 --- a/Controller/CaptchaController.php +++ b/Controller/CaptchaController.php @@ -31,7 +31,10 @@ class CaptchaController extends Controller /* @var \Gregwar\CaptchaBundle\Generator\CaptchaGenerator $generator */ $generator = $this->container->get('gregwar_captcha.generator'); - return new Response($generator->generate($key, $options)); + $response = new Response($generator->generate($key, $options)); + $response->headers->set('Content-type', 'image/jpeg'); + + return $response; } }