[TYPO3-core] RFC #12189: Add API functions for cleaning and flushing output buffers

Martin Kutschker masi-no at spam-typo3.org
Thu Oct 22 13:04:24 CEST 2009


Steffen Gebert schrieb:
> 
>>> I hope it's well tested, as I wonder a bit, how a header can be sent
>>> *after* ob_end_flush().
>>
>> Just call header() another time.
>
> Sorry, I don't catch you. I'd expect a "headers already sent out" warning.

My fault. I mixed up flush and clear :) Of course you are right. After the flushing of the buffers
you cannot send any more headers. Use headers_sent() to protect against the warning. Maybe the code
in t3lib_div should make this check.

>>> (if I'm right, we should read the contents of OB, end_clean(), send
>>> header and then output the contents..)
>>
>> That will depend on the context. In one situation you may want to get
>> rid of all current content, in
>> another one you may want to preserve and use it.
Y
> I see the difference between the two functions, but I'm not sure, if the
> flushing one really works (because of the mentioned problem that
> ob_end_flush() can already sent body data and a header() afterwards
> would fail..)

What problems? And where?

Masi


More information about the TYPO3-team-core mailing list