mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 18:42:40 +00:00
fixes #4839, assets served from vendors must provide proper extension to ensure accurate content type header is set
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7185 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
e57a7cc88c
commit
069fb0011c
2 changed files with 57 additions and 58 deletions
|
@ -615,6 +615,7 @@ class Dispatcher extends Object {
|
|||
* @access public
|
||||
*/
|
||||
function cached($url) {
|
||||
if (strpos($url, 'ccss/') !== false || strpos($url, 'ccss/') !== false || strpos($url, 'css/') !== false || strpos($url, 'js/') !== false) {
|
||||
if (strpos($url, 'ccss/') === 0) {
|
||||
include WWW_ROOT . DS . Configure::read('Asset.filter.css');
|
||||
$this->_stop();
|
||||
|
@ -625,9 +626,11 @@ class Dispatcher extends Object {
|
|||
$assets = array('js' => 'text/javascript', 'css' => 'text/css');
|
||||
$isAsset = false;
|
||||
|
||||
$ext = array_pop(explode('.', $url));
|
||||
|
||||
foreach ($assets as $type => $contentType) {
|
||||
if ($type === $ext) {
|
||||
$pos = strpos($url, $type . '/');
|
||||
if ($pos !== false) {
|
||||
$isAsset = true;
|
||||
break;
|
||||
}
|
||||
|
@ -677,6 +680,7 @@ class Dispatcher extends Object {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Configure::read('Cache.check') === true) {
|
||||
$path = $this->here;
|
||||
|
|
|
@ -24,11 +24,6 @@
|
|||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
if(Configure::read() > 0):
|
||||
Debugger::checkSessionKey();
|
||||
endif;
|
||||
?>
|
||||
<p>
|
||||
<cake:nocache>
|
||||
<span class="notice">
|
||||
|
@ -50,7 +45,7 @@ endif;
|
|||
if (Cache::isInitialized()):
|
||||
__('set up and initialized properly.');
|
||||
$settings = Cache::settings();
|
||||
echo '<p>' . $settings['class'];
|
||||
echo '<p>' . $settings['engine'];
|
||||
__(' is being used to cache, to change this edit config/core.php ');
|
||||
echo '</p>';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue