Wednesday, June 24, 2009

Re: Controller redirect function not setting status properly?

What do you see in firebug?
One regular request with 200
and another to /not-found with 404?

On Jun 23, 9:40 pm, Jamie <jamie....@gmail.com> wrote:
> OK, so I'm trying to do a simple redirect in a controller with a 404
> error code. The call looks like this (within a method in my
> PagesController class):
>
> $this->redirect('/not-found', 404);
>
> The redirect works, but the HTTP header status is 200, not 404
> (according to a 'LiveHTTPHeaders' plugin for Firefox). Am I doing
> something wrong? Or is this a bug? Or maybe a faulty plugin? Anyone
> else use the redirect status option with success?
>
> - Jamie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: