Fixes bug where incorrect header being sent on CSS

This will require a cache clear (Software udpate, or, php artisan cache:clear)
This commit is contained in:
Sam Georges 2014-05-16 15:01:31 +10:00
parent 0185244710
commit 0d903c5b78
1 changed files with 6 additions and 5 deletions

View File

@ -171,10 +171,11 @@ class CombineAssets
$version = $combiner->getLastModified();
$cacheInfo = [
'output' => $cacheId.'-'.$version,
'version' => $version,
'files' => $assets,
'path' => $this->path
'output' => $cacheId.'-'.$version,
'version' => $version,
'files' => $assets,
'path' => $this->path,
'extension' => $extension
];
$this->putCache($cacheId, $cacheInfo);
@ -208,7 +209,7 @@ class CombineAssets
$combiner = $this->prepareCombiner($cacheInfo['files']);
$contents = $combiner->dump();
$mime = (File::extension($cacheInfo['output']) == 'css') ? 'text/css' : 'text/javascript';
$mime = ($cacheInfo['extension'] == 'css') ? 'text/css' : 'text/javascript';
header_remove();
$response = Response::make($contents);