Added early 404 kill if requested image is not found
This commit is contained in:
		
							parent
							
								
									04cde74226
								
							
						
					
					
						commit
						4d69e7ce34
					
				| @ -279,6 +279,12 @@ class ImageIO extends Extension | |||||||
|                 $file = $image->get_image_filename(); |                 $file = $image->get_image_filename(); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  |             if (!file_exists($file)) { | ||||||
|  |                 http_response_code(404); | ||||||
|  |                 die(); | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|             if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) { |             if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) { | ||||||
|                 $if_modified_since = preg_replace('/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"]); |                 $if_modified_since = preg_replace('/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"]); | ||||||
|             } else { |             } else { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user