[TYPO3-mvc] More magic needed: disableAllHeaderCode in easy?
Xavier Perseguers
typo3 at perseguers.ch
Sun Jun 14 15:58:36 CEST 2009
Hi,
I'm trying to output a PNG file from an Extbase action. Problem is that
somewhere Extbase outputs an empty new line at beginning of file meaning
the result stream is not valid.
Example:
public function indexAction() {
header('Content-Type: image/png');
readfile('path/to/some/pngFile');
exit;
}
The result stream is invalid ("Image cannot be displayed...") since the
output starts with a new line.
Output should be erased first:
public function indexAction() {
header('Content-Type: image/png');
ob_clean();
readfile('path/to/some/pngFile');
exit;
}
--
Xavier Perseguers
http://xavier.perseguers.ch/en
One contribution a day keeps the fork away
More information about the TYPO3-project-typo3v4mvc
mailing list