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 Mon, 11 Aug 2003 10:01:18 GMT
Ahh, didn't know that..  Thanks Stas!

-Chris

----- Original Message ----- 
From: "Stas Bekman" <stas@stason.org>
To: "Chris Faust" <cfaust@doyougot.com>
Cc: <vincent54@mixmail.com>; <modperl@perl.apache.org>
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.
>
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>



Mime
View raw message