On Tue, 12 Mar 2002 16:23:57 +0100 Axel Andersson <[EMAIL PROTECTED]> wrote:
> Hello, > I'm having trouble with both setting a cookie and redirecting the user to > another page at the same time. It would appear the cookie is only sent > when a normal header is sent by server. > > If I do the following (having baked the cookie first), where $r is the > Apache->request() object: > > $r->content_type("text/html; charset=iso-8859-1"); > $r->send_http_header(); > Hi, a common trick to solve this is to use err_header_out() request method. For example: use Apache::Constants qw(:common); $r->err_header_out("Set-Cookie" => $my_cookie ); $r->custom_response(SERVER_ERROR, $my_custom_redir_location); return SERVER_ERROR; Bye Enrico ========================================================= Enrico Sorcinelli - Gruppo E-Comm - Italia On Line S.p.a. E-Mail: [EMAIL PROTECTED] - [EMAIL PROTECTED] =========================================================