From c26b93aba509726843a3c1a458f76a24043e6aa6 Mon Sep 17 00:00:00 2001 From: Martin Stone Date: Fri, 28 Jun 2013 09:47:20 +0000 Subject: [PATCH] image.php: Flush headers and output buffer to prevent a leading empty line in some instances. Signed-off-by: Martin Stone --- image.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/image.php b/image.php index dcc7d806..a134e658 100644 --- a/image.php +++ b/image.php @@ -41,6 +41,8 @@ header("Content-type: image/png"); $stamp = gmdate("D, d M Y H:i:s", filemtime($filename)). " GMT"; header("Last-Modified: $stamp", true); + ob_clean(); // discard any data in the output buffer (if possible) + flush(); // flush headers (if possible) readfile($filename); } } else { -- 2.39.5