[TYPO3-core] RFC: #9281: Add a method to easily do a HTTP redirect

Ingo Renner ingo at typo3.org
Wed Sep 3 19:53:38 CEST 2008


Dmitry Dulepov [typo3] wrote:
> Hi!
> 
> Ingo Renner wrote:
>> Problem:
>> Up until now if you want to do a HTTP redirect you have to call 
>> multiple functions.
>>
>> Solution:
>> To make this easier we need to introduce a single method.
> 
> +1, good feature! Possible we could use locationHeaderUrl directly 
> inside header(), without assigning to $url. But I do not insist, current 
> code is fine with me!
> 
> One good thing that we could add is "@ob_end_clean();" before the first 
> header(). This would cleanup any buffered output that already started 
> because it will be useless in case of redirect.

I just read up the documentation of ob_end_clean(). According to that it 
only throws an E_NOTICE on failure, failures happen when f.e. the 
function gets called without an active buffer or that for some reason a 
buffer could not be deleted.

Now with TYPO3 the case is like follows:
   * output buffering is only activated when 
$TYPO3_CONF_VARS['FE']['compressionLevel'] is set
   * as this function is added to t3lib we got to assume that people 
might use it independent from TYPO3 by only using the framework, but not 
the cms

Therefore I think this should be left top the developer, too... Other 
opinions?


Ingo


-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2


More information about the TYPO3-team-core mailing list