Apache-GzipChain
view release on metacpan or search on metacpan
343536373839404142434445464748495051525354
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 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
2829303132333435363738394041424344454647
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
8687888990919293949596979899100101102103104105106It 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 )