Added early 404 kill if requested image is not found

This commit is contained in:
Matthew Barbour 2020-06-11 20:09:17 -05:00 committed by Shish
parent 04cde74226
commit 4d69e7ce34

View file

@ -279,6 +279,12 @@ class ImageIO extends Extension
$file = $image->get_image_filename();
}
if (!file_exists($file)) {
http_response_code(404);
die();
}
if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) {
$if_modified_since = preg_replace('/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"]);
} else {