Hi.
I'm trying to redirect users via. a Location header (internal redirect
is not ideal - I need the browser to send the cookie to the page). The
problem is specifying the header in a header_out doesn't cause it to be
sent. This is my current implementation code:
sub do_login {
my ($self) = @_;
my $uinfo = Nett::UserInfo->new;
my $user = $self->{AR}->param('uname');
my $pass = $self->{AR}->param('passwd');
my $return = $uinfo->auth($user, $pass);
if ($return == 1) {
$self->show_login_page("The user id/password was not
correct.");
exit;
}
<get some data>
my $sess = sha1_hex($seed);
my $c = Apache::Cookie->new($self->{R},
-name => "NettSessionCookie",
-value => $sess,
-path => ".montereyhigh.com",
-expires => "+1d",
-path => "/"
);
$c->bake;
<some db stuff>
$self->{R}->no_cache(1);
$self->{R}->header_out("Location", "/nettexec/welcome");
$self->{R}->send_http_header;
print "redir";
#$self->{R}->internal_redirect("/nettexec/welcome");
}
The cookie gets set just fine, but a Location is never sent (Expire is
though)
--
--------------------------------------------------------------------
Yann Ramin [EMAIL PROTECTED]
Atrus Trivalie Productions www.redshift.com/~yramin
Monterey High IT www.montereyhigh.com
ICQ 46805627
AIM oddatrus
Marina, CA
IRM Developer Network Toaster Developer
SNTS Developer * Developer
"All cats die. Socrates is dead. Therefore Socrates is a cat."
- The Logician
--------------------------------------------------------------------