On Wed, Sep 03, 2003 at 09:42:00, Garrett Goebel said... > And gives the following recipe: > > Example A-3. redirect_cookie.pl > use Apache::Constants qw(REDIRECT OK); > my $r = shift; > # prepare the cookie in $cookie > $r->err_headers_out->add('Set-Cookie' => $cookie); > $r->headers_out->set(Location => $location); > $r->status(REDIRECT); > $r->send_http_header; > return OK; > > How would you have written it?
Seems to me you'd want to *return* REDIRECT, not set $r->status to REDIRECT. Here's what I do in this case: $r->header_out(Location => $location); return REDIRECT; I don't know if it's 100% correct, but it works quite well for me. I've also used $r->internal_redirect($location) for some things, but I don't think that's appropriate here. -- Michael Stella | Sr. Unix Engineer / Developer | http://www.thismetalsky.org "To dwell on the destination is to waste the journey" -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html