I haven't had any problems setting a cookie and redirecting on MP2 by using
the below

  $r->err_headers_out->add('Set-Cookie' => $packed_cookie);
  $r->header_out('Location' => $url);
  $r->status(REDIRECT);
  $r->send_http_header;

-Chris


----- Original Message ----- 
From: "gerard uolaquetalestem " <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 09, 2003 10:01 AM
Subject: $r->headers_out Location and Set-Cookie



I have the next problem, i am in page A that <form> points to page B, that
is
a modperl2 handler.
This handler makes a job and decides to send a cookie to the browser, and
after to redirect to the same page A who is ready to catch the cookie.

Then the problem is that if i put the two headers, i don't have the cookie
posted, but if i comment the Location header, then i stay at perl handler
location, and if i go manually to page A then i see that the cookie is
posted.

So why these two headers doesn't respect themselves?

Resuming
$r->headers_out->{'Set-Cookie'} = $cookie;
$r->headers_out->{'Location'} = $url;
Redirects the page to $url but cookie is not seen by browser

$r->headers_out->{'Set-Cookie'} = $cookie;
#$r->headers_out->{'Location'} = $url;
Location is the perl handler 'localhost/pageB/' (perl handler), if you then
go
to localhost/pageA (or simply click BACK button) then the browser DO see
the cookie!

Any idea?


-----
Un nuevo buscador mas rapido, eficaz y sencillo http://www.plaf.com
Ya.com ADSL Home 24h, Modem + Alta + 1 mes Gratis
http://acceso.ya.com/adslhome24h/


Reply via email to