Stas Bekman wrote:
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.
I've added this to the new mp2 cooking chapter:
http://perl.apache.org/docs/2.0/user/coding/cooking.html#Sending_Cookies_in_REDIRECT_Response
it would be useful to port interesting entries from
http://perl.apache.org/docs/1.0/guide/snippets.html
and may be add new ones...
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com