fix for content mismatch error

This commit is contained in:
Andy Miller
2015-06-30 16:14:06 -06:00
parent 1a91cf7033
commit 2b6740dc7b

View File

@@ -125,10 +125,13 @@ class Grav extends Container
}
}
Utils::download($medium->path(), false);
} else {
}
// has an extension, try to download it...
if (isset($path_parts['extension'])) {
$download = true;
// little work-around to ensure .css and .js files are always sent inline not downloaded
if (Utils::endsWith($uri->basename(), ['.css', '.js'])) {
if (in_array($path_parts['extension'], ['.css', '.js'])) {
$download = false;
}
Utils::download($page->path() . DIRECTORY_SEPARATOR . $uri->basename(), $download);