1 package Catalyst::Engine::Apache::MP19;
4 use base 'Catalyst::Engine::Apache';
7 use Apache::Connection ();
9 use Apache::RequestIO ();
10 use Apache::RequestRec ();
11 use Apache::RequestUtil ();
12 use Apache::Request ();
13 use Apache::Cookie ();
14 use Apache::Upload ();
18 Apache::Const->import( -compile => ':common' );
22 Catalyst::Engine::Apache::MP19 - Catalyst Apache MP19 Engine
30 This is the Catalyst engine specialized for Apache mod_perl version 2.
32 =head1 OVERLOADED METHODS
34 This class overloads some methods from C<Catalyst::Engine::Apache>.
38 =item $c->finalize_headers
42 sub finalize_headers {
45 for my $name ( $c->response->headers->header_field_names ) {
46 next if $name =~ /Content-Type/i;
47 my @values = $c->response->header($name);
48 $c->apache->headers_out->add( $name => $_ ) for @values;
51 if ( $c->response->header('Set-Cookie') && $c->response->status >= 300 ) {
52 my @values = $c->response->header('Set-Cookie');
53 $c->apache->err_headers_out->add( 'Set-Cookie' => $_ ) for @values;
56 $c->apache->status( $c->response->status );
57 $c->apache->content_type( $c->response->header('Content-Type') );
66 sub handler : method {
67 shift->SUPER::handler(@_);
70 =item $c->prepare_uploads
79 for my $field ( $c->apache->upload ) {
81 for my $upload ( $c->apache->upload($field) ) {
83 my $object = Catalyst::Request::Upload->new(
84 filename => $upload->filename,
85 size => $upload->size,
86 tempname => $upload->tempname,
90 push( @uploads, $field, $object );
94 $c->req->_assign_values( $c->req->uploads, \@uploads );
101 L<Catalyst>, L<Catalyst::Engine>, L<Catalyst::Engine::Apache>.
105 Sebastian Riedel, C<sri@cpan.org>
109 This program is free software, you can redistribute it and/or modify it under
110 the same terms as Perl itself.