Re: mod_perl And Redirection

2003-06-30 Thread Geoffrey Young
 $r-headers_in-unset(Content-length);
 $r-header_out(Location = $uri);
 $r-status(REDIRECT);
 $r-send_http_header;
 return REDIRECT;
well, you shouldn't ever mess with $r-status - that messes up Apache's
internal bookkeeping.  and don't send headers on an error response, which is
what REDIRECT is as far as Apache is concerned.  so, you end up with
$r-header_out(Location = $uri);
return REDIRECT;
HTH

--Geoff




mod_perl And Redirection

2003-06-26 Thread Rasoul Hajikhani
Hello there,

My apologies if you already have received this email, but I keep getting 
a message that the mail was not sent.

We have just upgraded to :

Apache/1.3.27 Ben-SSL/1.48 (Unix) PHP/4.2.3 mod_perl/1.27 configured

Running perl 5.6.1.

I am getting 302 error message on my redirects. This comes as a complete 
 surprise since the same piece of code works just fine on:

Apache/1.3.14 Ben-SSL/1.42 (Unix) PHP/4.0.3pl1 mod_perl/1.24_01 configured

Here is my code:

$r-headers_in-unset(Content-length);
$r-header_out(Location = $uri);
$r-status(REDIRECT);
$r-send_http_header;
return REDIRECT;
I am not sure where to begin debugging. I first wanted to check w/ you 
guys to see if there are any quick fixes.
I appreciate any feed back.
-r