On Sat, 9 Aug 2003, gerard uolaquetalestem  wrote:

>
> 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?


Yep. You need $r->err_headers_out->{'Location'} and you could change to 
$r->err_headers_out->{'Set-Cookie'} too.


- nick

-- 

~~~~~~~~~~~~~~~~~~~~
Nick Tonkin   {|8^)>

Reply via email to