fixed mime issues

This commit is contained in:
Claude 2013-04-13 15:17:59 +02:00
parent a928368479
commit a3b371c158

View File

@ -55,7 +55,8 @@ class Theme_assets extends CI_Controller
}
//send
header('Content-type: ' . mime_content_type($file_path));
$size = getimagesize($file_path);
header('Content-type: ' . $size['mime']);
$this->_expires_header(30);
readfile($file_path);
}
@ -75,7 +76,7 @@ class Theme_assets extends CI_Controller
$file_path = 'themes/' . $this->theme . '/js/' . $js_file;
//send
header('Content-type: application/x-javascript');
header('Content-Type: application/x-javascript; charset=utf-8');
$this->_expires_header(30);
readfile($file_path);
}