From 2b6740dc7ba4d273b68dfa645f78b6d261084bc7 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Tue, 30 Jun 2015 16:14:06 -0600 Subject: [PATCH] fix for content mismatch error --- system/src/Grav/Common/Grav.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Common/Grav.php b/system/src/Grav/Common/Grav.php index 97082402b..4379ee011 100644 --- a/system/src/Grav/Common/Grav.php +++ b/system/src/Grav/Common/Grav.php @@ -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);