How to return specific status code (for example 24) in symfony

i need to return crazy http code statuses for API in symfony

i need to return status code 24 i try to do it with:

$this->getResponse()->setStatusCode('24');

but i'm always getting response code 500

when i try to return "normal" status code like 404, 403:

$this->getResponse()->setStatusCode('403');

it has no problem

any ideas why?

8
задан Piotr M 9 December 2010 в 13:42
поделиться