From 81c322a85054fcdbec7839867578dbbc6d83cdb2 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 29 Mar 2016 18:01:01 +0200 Subject: set correct mime type even if files not found --- itjs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'itjs.php') diff --git a/itjs.php b/itjs.php index a037681..80cc6a7 100644 --- a/itjs.php +++ b/itjs.php @@ -31,7 +31,7 @@ itjs::far_future_headers(); # may exit $files = itjs::filenames($_GET['files'] ?: it::match('/itjs/([-a-z0-9_,.]*)', $_SERVER['PHP_SELF'])); $data = itjs::filecontents($files); -$lastfile = end($files); +$lastfile = end($files) ?: it::match('[^,]+$', $_GET['files']); # set correct mime type even if files not found if (it::match('\.gif$', $lastfile)) { -- cgit v1.2.3