in reply to mod_perl give 404 not_found with content

404 site:http://perl.apache.org/docs/2.0/
For example, if a handler wants to return a 404 response, but nevertheless to set a cookie, it has to be: $r->err_headers_out->add('Set-Cookie' => $cookie); return Apache2::Const::NOT_FOUND; If the handler does: $r->headers_out->add('Set-Cookie' => $cookie); return Apache2::Const::NOT_FOUND; the C<Set-Cookie> header won't be sent.

Replies are listed 'Best First'.
Re^2: mod_perl give 404 not_found with content
by Anonymous Monk on Apr 07, 2011 at 10:35 UTC
    But my problem is not so much in the headers but in printing the content. Is there an equivalent $r->err_content_out or something?
      Oops that post was by me, forgot to login.