Apache-GzipChain

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    sends gzipped data.

    It also sets or appends to the "Vary" header the values
    "Accept-Encoding" unless the config variable GzipForce is set, in which
    case the output is the same for all user agents.

Unicode
    To use this module under perl-5.8 or higher with Unicode data you have
    to convert to octets before printing them. Something like this will do:

      Encode::encode_utf8($res);

PREREQUISITES
    Compress::Zlib, Apache::OutputChain

AUTHOR
    Andreas Koenig, based on code by Jan Pazdziora

LICENSE
    This program is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

lib/Apache/GzipChain.pm  view on Meta::CPAN

    Apache::OutputChain::handler($r, 'Apache::GzipChain');
  }
}

sub PRINT {
  my $self = shift;
  my $res = join "", @_;
  return unless length($res);
  # srezic in RT 28732: Maybe it would also be appropriate to issue
  # a warning a la "wide character in PRINT", because I consider it
  # an error to have utf8-flagged characters in this stage.
  $self->Apache::OutputChain::PRINT(Compress::Zlib::memGzip($res));
}

1;

__END__


=head1 NAME

lib/Apache/GzipChain.pm  view on Meta::CPAN

It also sets or appends to the C<Vary> header the values
C<Accept-Encoding> unless the config variable GzipForce is set, in
which case the output is the same for all user agents.

=head1 Unicode

To use this module under perl-5.8 or higher with Unicode data you have
to convert to octets before printing them. Something like this will
do:

  Encode::encode_utf8($res);

=head1 PREREQUISITES

Compress::Zlib, Apache::OutputChain

=head1 AUTHOR

Andreas Koenig, based on code by Jan Pazdziora

=head1 LICENSE



( run in 0.971 second using v1.01-cache-2.11-cpan-49f99fa48dc )