I have had similar problems, and the solution seems to be (not sure why) to
print the redirect the same way you would using CGI.pm and
$r->send_http_header and then return OK, as in:

use CGI;
use Apache;
use Apache::Constants 'OK';

sub handler {
    my $r = shift;
    my $q = CGI->new();
    my %args = ();

    $args{$_} = $q->param($_) for($q->param);

    # Process %args

    $r->content_type('text/html');
    $r->print($q->redirect($uri));

    return OK;
}

This works, at least for me (Linux 2.2/Solaris 2.6, Apache 1.3.9, mod_perl
1.21).

darren

Jason Simms ([EMAIL PROTECTED]) wrote:
> I am having a _really_ strange problem with return() under mod_perl.  It 
> seems that any time I attempt to do a return REDIRECT after I have accessed 
> any passed parameters, the redirect will fail.  However, if I do the 
> redirect without accessing any passed parameters (either via POST or GET), 
> the redirect works fine.  I have debugged and debugged, and what I have 
> found is that if I create a hash of the passed parameters using $r->content, 
> $r->args, or even looping through with CGI::param, and then try and 
> redirect, it will fail.  The hash does indeed get created (I can loop 
> through and output the values fine), but the browser will "hang" right when 
> it tries to execute the return REDIRECT.  If I do not create the hash, the 
> redirect works perfectly.  Perhaps some examples would help...:
> 

-- 
Entropy isn't what it used to be.

Reply via email to