diff options
author | Urban Müller | 2016-03-29 18:01:01 +0200 |
---|---|---|
committer | Urban Müller | 2016-03-29 18:01:01 +0200 |
commit | 81c322a85054fcdbec7839867578dbbc6d83cdb2 (patch) | |
tree | 3458e6114a46f5e5a0f1803aa31d134ec8a6c498 | |
parent | a95f344fd13383121fdcb654ebb53c102cf4bf3a (diff) | |
download | itools-81c322a85054fcdbec7839867578dbbc6d83cdb2.tar.gz itools-81c322a85054fcdbec7839867578dbbc6d83cdb2.tar.bz2 itools-81c322a85054fcdbec7839867578dbbc6d83cdb2.zip |
set correct mime type even if files not found
-rw-r--r-- | itjs.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) { |