Hi, I've seen that the key is the status returned to apache.
With Apache::REDIRECT i have the next code works ok

$apache->err_headers_out->{'Set-Cookie'} = $value1;
$apache->err_headers_out->{'Location'} = $value2;

But exactly what's the difference between err_headers_out and
headers_out? I understand that the first is related with an error message
sended by headers, but i mean, really what does apache make different?

I find there is poor docs about that ... maybe i don't know where are the
good docs???




----- Original Message -----
Ahh, didn't know that.. Thanks Stas!

-Chris

----- Original Message -----
From: "Stas Bekman"
To: "Chris Faust"
Cc: ;
Sent: Sunday, August 10, 2003 2:37 PM
Subject: Re: $r->headers_out Location and Set-Cookie


> Chris Faust wrote:
> > 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;
>
> That's when you use Apache::compat, doing the mp1 syntax. In mp2-
speak
that
> would be:
>
> $r->err_headers_out->add('Set-Cookie' => $packed_cookie);
> $r->headers_out->set('Location' => $url);
> $r->status(REDIRECT);
>
> notice that you don't need to call $r->send_http_header, it doesn't exist
in mp2.

-----
Un nuevo buscador más rápido, eficaz y sencillo http://www.plaf.com
Ya.com ADSL Home 24h, Módem + Alta + 1 mes Gratis http://acceso.ya.com/adslhome24h/

Reply via email to