[Controller] Setting Content-type to image/jpeg

This commit is contained in:
Gregwar 2012-12-04 10:57:52 +01:00
parent c1b702566b
commit 39532390e1
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}
}