Apache-PageKit
view release on metacpan or search on metacpan
lib/Apache/PageKit.pm view on Meta::CPAN
return $pk->{model}->pkit_send($filename, $media_type);
# set path_info to '', otherwise Apache tacks it on at the end
## $apr->path_info('');
## $apr->filename($filename);
## return DECLINED;
}
sub _check_gzip {
my $pk = shift;
# check Accent-Encoding or if the user_agent field for Unix/Mac Netscape
# to see if should gzip output
my $gzip_output = $pk->{config}->get_global_attr("gzip_output") || 'none';
$pk->{use_gzip} = 'none';
my $apr = $pk->{apr};
if ($gzip_output =~ m!^(all|static)$!){
if(($apr->header_in("Accept-Encoding") || '') =~ /gzip/){
$pk->{use_gzip} = $gzip_output;
} else {
my $user_agent = $apr->header_in("User-Agent");
# this regular expression borrowed from Apache::AxKit::ConfigReader::DoZip
( run in 0.495 second using v1.01-cache-2.11-cpan-39bf76dae61 )