[TYPO3-core] RFC #12189: Add API functions for cleaning and flushing output buffers
Martin Kutschker
masi-no at spam-typo3.org
Thu Oct 22 12:07:09 CEST 2009
Steffen Gebert schrieb:
> Am 22.10.2009, 11:29 Uhr, schrieb Martin Kutschker
> <masi-no at spam-typo3.org>:
>
>>> Solution:
>>> introduce 2 new functions:
>>> t3lib_div::cleanOutputBuffers() and
>>> t3lib_div::flushOutputBuffers()
>>
>> +1 for the idea. Please enlighten me why the content-encoding header
>> is set to "none" in both functions?
>
> Because before "Content-encoding: gzip" was sent (queued to be sent?)
That has nothing to do with the output buffers. I can flush my buffers and still want to use some
kind of content encoding. The API call only clears/flushes the buffers and know *nothing* of the
kind of buffers that were in use. I understand now the reason, but this side effect (and its reason)
must be documented.
> 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.
> (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.
Masi
More information about the TYPO3-team-core
mailing list