perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Faust" <cfa...@doyougot.com>
Subject Re: $r->headers_out Location and Set-Cookie
Date Sun, 10 Aug 2003 12:35:26 GMT
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 " <vincent54@mixmail.com>
To: <modperl@perl.apache.org>
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/



Mime
View raw message