perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perrin Harkins <per...@elem.com>
Subject Re: [mp1] redirect in ErrorDocument
Date Fri, 17 Mar 2006 20:25:26 GMT
On Fri, 2006-03-17 at 16:41 +0000, Carl Johnstone wrote:
> In an Apache::Registry  ErrorDocument (e.g. ErrorDocument 404 /my404.pl )
> 
> This doesn't work:
> 
>   $r->header_out('Location', $newurl);
>   $r->status(302);
>   return OK;
> 
> 
> Apache returns an error saying that my 404 handler returned a 302 error.

I'm not sure apache will let you do this.

> Does the same if I use err_header_out
> 
> Yet enabling "PerlSendHeader On" and doing:
> 
>   print "Location: $newurl\n\n";
> 
> works fine.

What are the complete headers that sends?  I'm guessing it sends a 200
status and it only works because your browser is broken and follows the
redirect anyway.

- Perrin


Mime
View raw message