Hi!
 
 I have an access handler that uses $r->headers_out->add to add a set-cookie
header:

      $r->headers_out->add("Set-cookie"=>$sesc);

 If i try to access this in my ContentHandler, actually HTML::Mason, i find
a strange problem: Calling $r->content_type wipes out the header!

>From the handler.pl:

 sub handler
 {
    my ($r) = @_;

    $r->headers_out->do(sub { my ($k,$v) = @_; $r->log_error("OUT: $k=>$v"); 1; });

    return -1 if -e $r->finfo && $r->content_type && $r->content_type !~ m|^text/|i;
    
    $r->headers_out->do(sub { my ($k,$v) = @_; $r->log_error("OUT: $k=>$v"); 1; });
 
 .... snip ....

 }

 The first do call works fine returning something like this:

        [Thu Feb 10 12:11:47 2000] [error] OUT: Set-cookie=>MF_Session=14&950202707; 
domain=.mathforum.com; path=/

 The second returns nothing at all.

 Commenting out the content-type line fixes the problem... However, I like
that line and want it to stay!!!

 TIA,
  Confused in Swarthmore, aka Aaron
        

Reply via email to