1 package Catalyst::Engine::Apache::MP19::Base;
4 use base 'Catalyst::Engine::Apache::Base';
7 use Apache::Connection ();
9 use Apache::RequestIO ();
10 use Apache::RequestRec ();
11 use Apache::RequestUtil ();
12 use Apache::Response ();
14 Apache::Const->import( -compile => ':common' );
18 Catalyst::Engine::Apache::MP19::Base - Base class for MP 1.9 Engines
26 This is a base class for MP 1.99 Engines.
28 =head1 OVERLOADED METHODS
30 This class overloads some methods from C<Catalyst::Engine::Apache::Base>.
34 =item $c->finalize_headers
38 sub finalize_headers {
41 for my $name ( $c->response->headers->header_field_names ) {
42 next if $name =~ /^Content-(Length|Type)$/i;
43 my @values = $c->response->header($name);
44 $c->apache->headers_out->add( $name => $_ ) for @values;
47 if ( $c->response->header('Set-Cookie') && $c->response->status >= 300 ) {
48 my @values = $c->response->header('Set-Cookie');
49 $c->apache->err_headers_out->add( 'Set-Cookie' => $_ ) for @values;
52 $c->apache->status( $c->response->status );
54 if ( my $type = $c->response->header('Content-Type') ) {
55 $c->apache->content_type($type);
58 if ( my $length = $c->response->content_length ) {
59 $c->apache->set_content_length($length);
69 sub handler : method {
70 shift->SUPER::handler(@_);
77 L<Catalyst>, L<Catalyst::Engine>, L<Catalyst::Engine::Apache::Base>.
81 Sebastian Riedel, C<sri@cpan.org>
82 Christian Hansen C<ch@ngmedia.com>
86 This program is free software, you can redistribute it and/or modify it under
87 the same terms as Perl itself.