Octavian Rasnita wrote:
Hi,

All works fine, with the single big problem (until now) that if I use
header_props() in cgiapp_postrun, nothing is printed on the page and the
program returns the HTTP header Content-Length: 0.

That method is just:

sub cgiapp_postrun {
my $self = shift;
$self->header_props(-charset => 'ISO-8859-2');
}

here's my version:
sub cgiapp_postrun
{
  my $self = shift;
  my $outputref = shift;
  my %props;

  if($self->header_type eq 'header')
  {
    %props = $self->header_props;
    if(!exists($props{'-type'}) or $props{'-type'} eq 'text/html')
    {
      $self->header_add(-type=>'text/html', -charset=>'utf-8');

      if( $$outputref !~ m/equiv.*charset/ )
      {
          $$outputref =~ s{(<head.*?>)}
                          {
                           $1
                           <meta http-equiv="Content-Type"
                           content="text/html; charset=utf-8" />
                          }si;
      }
    }
  }
}

Well, give or take some whitespace...


I guess there is an incompatibility with the Authentication plugins, but I
don't know how to solve it.

This method works fine before the login, but after logging correctly,
nothing is printed.

I use this in combination with both CAP::Auth and CAP::Authz, and have not had a problem.

HTH,
Rhesa

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to