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.

not to mention it's entirely unnecessary (and undesirable) to send headers on error responses such as redirects.


and you should never set $r->status from a handler - for Registry scripts it's ok, since we use it as a hack to get around some things, but handlers should never manipulate the value of $r->status.

--Geoff



Reply via email to