Apache-HeavyCGI
view release on metacpan or search on metacpan
lib/Apache/HeavyCGI.pm view on Meta::CPAN
$VERSION = "0.013302";
sub can_gzip {
my Apache::HeavyCGI $self = shift;
return $self->{CAN_GZIP} if defined $self->{CAN_GZIP};
my $acce = $self->{R}->header_in('Accept-Encoding') || "";
return $self->{CAN_GZIP} = 0 unless $acce;
$self->{CAN_GZIP} = $acce =~ /\bgzip\b/;
}
sub can_png {
my Apache::HeavyCGI $self = shift;
return $self->{CAN_PNG} if defined $self->{CAN_PNG};
my $acce = $self->{R}->header_in("Accept") || "";
return $self->{CAN_PNG} = 0 unless $acce;
$self->{CAN_PNG} = $acce =~ m|image/png|i;
}
sub can_utf8 {
my Apache::HeavyCGI $self = shift;
return $self->{CAN_UTF8} if defined $self->{CAN_UTF8};
# From chapter 14.2. HTTP/1.1
## If no Accept-Charset header is present, the default is that any
## character set is acceptable. If an Accept-Charset header is present,
lib/Apache/HeavyCGI.pm view on Meta::CPAN
=over
=item CAN_GZIP
Set by the can_gzip method. True if client is able to handle gzipped
data.
=item CAN_PNG
Set by the can_png method. True if client is able to handle PNG.
=item CAN_UTF8
Set by the can_utf8 method. True if client is able to handle UTF8
endoded data.
=item CGI
An object that handles GET and POST parameters and offers the method
param() and upload() in a manner compatible with Apache::Request.
( run in 1.779 second using v1.01-cache-2.11-cpan-df04353d9ac )