1 package Catalyst::Engine::Apache::MP20::Base;
4 use base 'Catalyst::Engine::Apache::Base';
6 use Apache2::Connection ();
8 use Apache2::RequestIO ();
9 use Apache2::RequestRec ();
10 use Apache2::RequestUtil ();
12 Apache2::Const->import( -compile => ':common' );
16 Catalyst::Engine::Apache::MP20::Base - Base class for MP 2.0 Engines
24 This is a base class for MP 2.0 Engines.
26 =head1 OVERLOADED METHODS
28 This class overloads some methods from C<Catalyst::Engine::Apache::Base>.
32 =item $c->finalize_headers
36 sub finalize_headers {
39 for my $name ( $c->response->headers->header_field_names ) {
40 next if $name =~ /Content-Type/i;
41 my @values = $c->response->header($name);
42 $c->apache->headers_out->add( $name => $_ ) for @values;
45 if ( $c->response->header('Set-Cookie') && $c->response->status >= 300 ) {
46 my @values = $c->response->header('Set-Cookie');
47 $c->apache->err_headers_out->add( 'Set-Cookie' => $_ ) for @values;
50 $c->apache->status( $c->response->status );
51 $c->apache->content_type( $c->response->header('Content-Type') );
60 sub handler : method {
61 shift->SUPER::handler(@_);
68 L<Catalyst>, L<Catalyst::Engine>, L<Catalyst::Engine::Apache::Base>.
72 Sebastian Riedel, C<sri@cpan.org>
73 Christian Hansen C<ch@ngmedia.com>
77 This program is free software, you can redistribute it and/or modify it under
78 the same terms as Perl itself.