image.php: Flush headers and output buffer to prevent a leading empty line in some instances.
Signed-off-by: Martin Stone <martin@d7415.co.uk>
This commit is contained in:
parent
ce920ec148
commit
c26b93aba5
1 changed files with 2 additions and 0 deletions
|
@ -41,6 +41,8 @@
|
||||||
header("Content-type: image/png");
|
header("Content-type: image/png");
|
||||||
$stamp = gmdate("D, d M Y H:i:s", filemtime($filename)). " GMT";
|
$stamp = gmdate("D, d M Y H:i:s", filemtime($filename)). " GMT";
|
||||||
header("Last-Modified: $stamp", true);
|
header("Last-Modified: $stamp", true);
|
||||||
|
ob_clean(); // discard any data in the output buffer (if possible)
|
||||||
|
flush(); // flush headers (if possible)
|
||||||
readfile($filename);
|
readfile($filename);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue