summaryrefslogtreecommitdiff
path: root/itjs.php
diff options
context:
space:
mode:
authorUrban Müller2016-03-29 18:01:01 +0200
committerUrban Müller2016-03-29 18:01:01 +0200
commit81c322a85054fcdbec7839867578dbbc6d83cdb2 (patch)
tree3458e6114a46f5e5a0f1803aa31d134ec8a6c498 /itjs.php
parenta95f344fd13383121fdcb654ebb53c102cf4bf3a (diff)
downloaditools-81c322a85054fcdbec7839867578dbbc6d83cdb2.tar.gz
itools-81c322a85054fcdbec7839867578dbbc6d83cdb2.tar.bz2
itools-81c322a85054fcdbec7839867578dbbc6d83cdb2.zip
set correct mime type even if files not found
Diffstat (limited to 'itjs.php')
-rw-r--r--itjs.php2
1 files changed, 1 insertions, 1 deletions
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))
{