perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Faust" <>
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);


----- Original Message ----- 
From: "gerard uolaquetalestem " <>
To: <>
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
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

So why these two headers doesn't respect themselves?

$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
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 ADSL Home 24h, Modem + Alta + 1 mes Gratis

View raw message