From: Andrew Dolgov Date: Sun, 31 Mar 2013 05:54:52 +0000 (+0400) Subject: replace fopen/fread loop with readfile X-Git-Tag: 1.7.6~119 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=bf1fee83471cc9efef9f8d3ade0cd00b84633cf1;p=tt-rss.git replace fopen/fread loop with readfile --- diff --git a/image.php b/image.php index 60f2cc83..94cb8e81 100644 --- a/image.php +++ b/image.php @@ -31,14 +31,7 @@ $stamp = gmdate("D, d M Y H:i:s", filemtime($filename)). " GMT"; header("Last-Modified: $stamp", true); - $fp = fopen($filename, "r"); - - if ($fp) { - while ($data = fread($fp, 32768)) { - print $data; - } - fclose($fp); - } + readfile($filename); } else { header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");