Skip to content

Commit

Permalink
Updated controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Francis Besset committed Feb 22, 2011
1 parent 97a3723 commit 65ed2d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Controller/PackingMinifyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace BeSimple\PackingMinifyBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;

class PackingMinifyController extends Controller
{
Expand All @@ -12,12 +13,12 @@ public function getAction($file)

if (false !== $content = $this->get('packing_minify')->get($file, $format)) {
if ($format == 'css') {
return $this->createResponse($content, 200, array('Content-Type' => 'text/css'));
return new Response($content, 200, array('Content-Type' => 'text/css'));
} else {
return $this->createResponse($content, 200, array('Content-Type' => 'application/x-javascript'));
return new Response($content, 200, array('Content-Type' => 'application/x-javascript'));
}
}

return $this->createResponse('', 404);
return new Response('', 404);
}
}

0 comments on commit 65ed2d8

Please sign in to comment.