summaryrefslogtreecommitdiff
path: root/image.php
diff options
context:
space:
mode:
authorMartin Stone <[email protected]>2013-06-28 09:47:20 +0000
committerMartin Stone <[email protected]>2013-06-28 09:47:20 +0000
commitc26b93aba509726843a3c1a458f76a24043e6aa6 (patch)
treeaa3438b818475662abb42ad02ee4326ed91fedad /image.php
parentce920ec1488acef9f836ce68541e6dae175c7915 (diff)
image.php: Flush headers and output buffer to prevent a leading empty line in some instances.
Signed-off-by: Martin Stone <[email protected]>
Diffstat (limited to 'image.php')
-rw-r--r--image.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/image.php b/image.php
index dcc7d806d..a134e658e 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 {