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

Steffen Gebert steffen at steffen-gebert.de
Thu Oct 22 12:15:01 CEST 2009


Am 22.10.2009, 12:07 Uhr, schrieb Martin Kutschker  
<masi-no at spam-typo3.org>:

>> 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.
Yes, of course, it *could* have been sent.
But I see no problem in sending "None".


>> 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.

>
>> (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.
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..)

Steffen


More information about the TYPO3-team-core mailing list