FCGI-Buffer

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	Don't use the cache if the client sends max-age=0
	Added cache_age option to init()
	Removed Test::TempDir RT102225
	Added t/cache.t
	Fix '(in cleanup) Can't call method "READ" on an undefined value'
		Perl >= 5.14.0 only
	Improved handling of Wide characters

0.02	Sat Jan 31 11:16:28 EST 2015
	Fix set_options
	Fix handling when content-type isn't set

0.01	Thu Jan 29 15:42:06 EST 2015
	First draft, clone from CGI::Buffer and object orient the code

lib/FCGI/Buffer.pm  view on Meta::CPAN

}

sub _set_content_type
{
	my $self = shift;
	my $headers = shift;

	foreach my $header (split(/\r?\n/, $headers)) {
		my ($header_name, $header_value) = split /\:\s*/, $header, 2;
		next unless(defined($header_name) && defined($header_value));
		if(lc($header_name) eq 'content-type') {
			my @content_type = split /\//, $header_value, 2;
			$self->{content_type} = \@content_type;
		} elsif((lc($header_name) eq 'content-encoding') && (lc($header_value) !~ /^\s*identity\s*$/)) {
			$self->{_script_encoded} = 1;
		}
	}
}

# Compress the body with the given encoding, from _should_gzip()
sub _compress



( run in 2.455 seconds using v1.01-cache-2.11-cpan-99fa8243a42 )