Konstrukt
view release on metacpan or search on metacpan
lib/Konstrukt/Handler/Apache.pm view on Meta::CPAN
}
#set custom headers
my $headers = $Konstrukt::Response->headers();
foreach my $field (keys %{$headers}) {
if (MODPERL == 1) { #weird...
$request->header_out($field => $headers->{$field});
} else {
$request->headers_out->add($field => $headers->{$field});
}
#special case for content-type and content-encoding, which have to be defined explicitly
if ($field eq 'Content-Type') {
$request->content_type($headers->{$field});
} elsif ($field eq 'Content-Encoding') {
$request->content_encoding($headers->{$field});
}
}
#set status code
$request->status($Konstrukt::Response->status());
#don't cache my dynamic documents!
( run in 0.895 second using v1.01-cache-2.11-cpan-d7f47b0818f )