Apache-GzipChain

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
    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

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
    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

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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.516 second using v1.01-cache-2.11-cpan-dcdd9aafbe2 )