[TYPO3-core] RFC #9400: Integrate jb_status_code in the TYPO3 core

Andreas Wolf typo3ml at andreaswolf.info
Sun Sep 21 09:33:41 CEST 2008


Hi Benni!

Benjamin Mack schrieb:
> Hey all,
> 
> this a SVN patch request.
> 
> Type:     Feature
> Branches: trunk only
> BT:       http://bugs.typo3.org/view.php?id=9400
+1 for this way of writing the header - it's way better legible than the
old one, especially on "small" screens (<= 1024x768).

> Problem / Solution:
> This patch enables to have specific HTTP status codes on a sys_domain
> record when doing a redirect.
> 
> Notes:
> This is an almost 1:1 implementation of the extension " jb_status_code"
> with the exception of:
>  * I renamed the DB field and the TCA variable of course.
>  * I use the newly introduced constants on the redirect
> 
> Although I've written the patch the last days in a quick minute, I
> haven't tested the patch yet, but will do the next days, just wanted to
> make sure we don't loose that patch in my trash ;-)
Well, I read it and give my +1 from reading. Unfortunately I have no
time to test it, but I'm sure it will work.

Just some little nitpicks: This line

header('Location: '.t3lib_div::locationHeaderUrl($rURL), true, $statusCode);

is indented with spaces, could you correct it to tabs?


And why did you use constant('...') here? Shouldn't
t3lib_div::HTTP_STATUS_301 suffice?

header(constant('t3lib_div::HTTP_STATUS_301')));


You could also limit the value of the status code from 100 to 599, or to
999 to be future-proof. 10 and 1000 are just one digit to little and one
too much - so on the other hand the average is already ok ;)


Apart from that, nice patch. Seems the new constants in t3lib_div get
adopted really quickly :)

Cheers

Andreas


More information about the TYPO3-team-core mailing list